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