On Tue, Jul 16, 2013 at 1:20 PM, Mary Clark <[email protected]> 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 [email protected].
> To post to this group, send email to [email protected].
> 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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.