Need some help regarding writing tests

31 views
Skip to first unread message

Nikhil Pappu

unread,
Sep 9, 2017, 12:50:27 PM9/9/17
to sympy
How should I avoid errors on Travis tests? I implemented a new class  in sympy.polys.agca which inherits from Basic and Expr.

I did not implement tests yet. Where exactly should I place these tests (in sympy.core.tests/test_args or in sympy.polys.agca.tests or in both or elsewhere)?

Should I write my code in Python 2.7 as well for it to pass the Travis tests?
Message has been deleted

Valeriia Gladkova

unread,
Sep 10, 2017, 7:50:33 AM9/10/17
to sympy
The tests should be in the same module as the new class, i.e. in sympy.polys.agca.tests in this case. If you created this class in a new file, you should probably create a new file in the tests folder as well. E.g. if your class is in a file called filename.py, then the corresponding test file should be called test_filename.py.

And yes, the code should work in Python 2.7 too. You shouldn't have to write separate code though. Have a look at this: https://github.com/sympy/sympy/wiki/Development-workflow#python-3


Reply all
Reply to author
Forward
0 new messages