On Tue, Jul 16, 2013 at 1:20 PM, Mary Clark <mary.spritel...@gmail.com> wrote: > Right, okay. So I did that for both CartanType_generator and > Standard_Cartan and the tests passed for CartanType_generator, but not > Standard_Cartan and I'm not entirely sure why. > > Here is the test I wrote for Standard_Cartan: > > def test_sympy__liealgebras__cartan_type__Standard_Cartan(): > from sympy.liealgebras.cartan_type import Standard_Cartan > assert _test_args(Standard_Cartan("A", 2)) > > which gives the error: > > > sympy/core/tests/test_args.py:test_sympy__liealgebras__cartan_type__Standard_Cartan > File "/users/maryclark/sympy/sympy/core/tests/test_args.py", line 1647, in > test_sympy__liealgebras__cartan_type__Standard_Cartan > assert _test_args(Standard_Cartan("A", 2)) > AssertionError > > Could you help me figure out what is going wrong with this test?
So to debug this, simply look at the definition of _test_args(), which is just this: def _test_args(obj): return all(isinstance(arg, Basic) for arg in obj.args) So what you can do is to for example print: print [isinstance(arg, Basic) for arg in obj.args] where obj = Standard_Cartan("A", 2) and this will print which of your args is not an instance of Basic. Then you go to the code which defines Standard_Cartan and fix the __init__ method (most probably), so that it only stores instances of Basic in .args. Ondrej > > > Mary > > -- > 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 sympy+unsubscr...@googlegroups.com. > To post to this group, send email to sympy@googlegroups.com. > Visit this group at http://groups.google.com/group/sympy. > 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 sympy+unsubscr...@googlegroups.com. To post to this group, send email to sympy@googlegroups.com. Visit this group at http://groups.google.com/group/sympy. For more options, visit https://groups.google.com/groups/opt_out.