On Fri, Feb 22, 2013 at 6:00 PM, David Joyner <[email protected]> wrote: > On Sat, Feb 16, 2013 at 9:01 PM, Aaron Meurer <[email protected]> wrote: >> On Sat, Feb 16, 2013 at 6:07 PM, David Joyner <[email protected]> wrote: > > ... > >>>> >>>> I think the examples are fine, but you also need tests. >>> > > Is it okay to have the test file full of the same examples as in the > docstrings, but with assert statements?
Tests and docstrings serve different purposes. Docstring examples should demonstrate to the user what the functionality is, and what the input and outputs look like. Tests test for correctness of the code. Ideally, each line of the code should be covered by one of the tests. Some tests would be stupid as examples, like trivial corner cases. > >>> >>> This will depend on where it will go, I guess? >>> > > ... > >>>> >>>> >>>> Can you submit this as a pull request? >>>> > > ... > >> >> There's a guide at >> https://github.com/sympy/sympy/wiki/Development-workflow. GitHub also >> has pretty extensive guides in their help. > > Another dumb git question. > > I see how to add files. > > If I have a directory sympy/crypto with files crypto.py, etc, and > a subdirectory sympy/crypto/tests, with files in it, will > > git add crypto/* > > add everything? I didn't see a clear answer to this in the docs > or an online search. Yes. This will mark everything in the crypto directory for committing, so that the next time you type "git commit", they will all be included. Except it won't add anything that is in .gitignore (like .pyc files), so you don't need to worry about that. If you add new files, also don't forget to add them to setup.py. Aaron Meurer > >> >> Aaron Meurer >> >>> >>>> Aaron Meurer >>>> >>>> >>>> >>> >>> ... >>> >>>> > > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/sympy?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sympy?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
