You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After adding edges and nodes via the straight-forward methods of classes "Graph" and "Digraph", it would be highly helpful to quickly retrieve the total count of nodes and edges via getter-methods. Currently, I just see the "source"-method to get dot source code, but this rather provides a list of edges than the integer count. The latter one would be relevant for consistency checks and assertions.
The text was updated successfully, but these errors were encountered:
Re: testing your code, I think you might want to go further than checking numbers of calls. This can be done by using the mock module as a 'spy' with the wraps keyword (you can assert on number of calls but also unpack arguments to make more specific assertions and hopefully also get useful diffing, see https://docs.python.org/3/library/unittest.mock.html):
At the same time, I totally agree that it would be nice, e.g. for the repr() of a Graph instance to include the node and edge count (in general, statistics about the kinds of statements produced), and I also think that it would be nice to make them easily accessible (probably via properties). I currently don't see any blocker, marking this as enhancement.
After adding edges and nodes via the straight-forward methods of classes "Graph" and "Digraph", it would be highly helpful to quickly retrieve the total count of nodes and edges via getter-methods. Currently, I just see the "source"-method to get dot source code, but this rather provides a list of edges than the integer count. The latter one would be relevant for consistency checks and assertions.
The text was updated successfully, but these errors were encountered: