-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doctest Canvas #3
Conversation
All :Example: converted to doctest. Minor formatting of Canvas.py. Updated lots of xmldocs to facilitate docstring tests.
Most doctests passing. Some fail due to implementation errorsi/bugs.
:rtype: list | ||
""" | ||
>>> vcs.graphicsmethodlist() # Return graphics method list | ||
['boxfill', 'isofill', 'isoline', 'meshfill', 'scatter', 'vector', 'xvsy', 'xyvsy', 'yxvsx', ...] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all the yxvsx xyvsy etc... need to be replaced with 1d no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also we need to add the 3d in here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@doutriaux1
Doctests have you supply a line of code of the format:
>>> object.method()
'Return value'
When I call vcs.graphicsmethodlist() in a python console, it gives me the specified array.
The reason that I have the ...
at the end is that the array is too large to fit in 120 characters, and doctest will throw an error if I dont have the exact array, unless I throw ...
in there, which is kind of like a wildcard "match anything here" statement.
My thought was that the examples are to give a representation of what expected output should generally look like, not the exact details.
'xvsy', 'xyvsy', 'yxvsx', as well as '1d' and other things I don't show here show up in my array, when I call graphicsmethodlist().
vcsError: The object passed is not a graphics method object. | ||
|
||
:returns: If gobj is a graphics method object, returns its type: 'boxfill', 'isofill', 'isoline', | ||
'scatter', 'vector', 'xvsy', 'xyvsy', or 'yxvsx', 'taylordiagram'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@doutriaux1 , I submitted #7 to address the issues you have with this PR.
This pull request adds doctests to all of the examples in Canvas.py.