Currently, the pytest tests fail, due to Network.show being called on Network instances that were initialised with notebook=False, meaning that Network.prep_notebook wasn't called and self.template remains as None. As Network.show's notebook argument defaults to True, it by default attempts to call self.template.render' and errors becauseNone` doesn't have this method.
This PR changes show to default to notebook=False, which follows the pattern used in other methods. The pytest tests now pass.
If notebook=True really is the desired default for show, an alternative is to explicitly set notebook=False in the tests.
Currently, the
pytest
tests fail, due toNetwork.show
being called onNetwork
instances that were initialised withnotebook=False
, meaning thatNetwork.prep_notebook
wasn't called andself.template
remains asNone
. AsNetwork.show
'snotebook
argument defaults toTrue
, it by default attempts to callself.template.render' and errors because
None` doesn't have this method.This PR changes
show
to default tonotebook=False
, which follows the pattern used in other methods. The pytest tests now pass.If
notebook=True
really is the desired default forshow
, an alternative is to explicitly setnotebook=False
in the tests.