Skip to content
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

Closed
wants to merge 7 commits into from
Closed

doctest Canvas #3

wants to merge 7 commits into from

Conversation

chaosphere2112
Copy link
Contributor

This pull request adds doctests to all of the examples in Canvas.py.

Ed Brown added 7 commits September 20, 2016 11:00
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', ...]
Copy link
Contributor

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?

Copy link
Contributor

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

Copy link

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'.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Copy link

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.

@ghost ghost mentioned this pull request Sep 26, 2016
@doutriaux1 doutriaux1 deleted the doctest_canvas_rebase branch June 13, 2017 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants