Hi, We've run into a problem with odd and (to us) unpredictable failures in nosetests when using Sympy and we would be very grateful for any advice. When running nosetests on the individual file, there are no problems, but the problems emerge when running the entire test suite.
We are wondering if we've run into the same kinds of problems referred to here: http://code.google.com/p/sympy/issues/detail?id=635 In our code we have have a subclass of Symbol: > somewhere.py > --------------------- > > class MySymbol(sympy.Symbol): > > def __new__ etc. We import this in some modules, let's say > module1.py > ----------------- > > from somewhere import MySymbol > > i = MySymbol('i') > > module2.py > ----------------- > > from somewhere import MySymbol > > i = MySymbol('i') but then - in our nosetests we run into problems of the following form: > downstream.py > ---------------------- > > from module1 import i as i1 > from module2 import i as i2 > from somewhere import MySymbol > > assert(i1 != i2) # sometimes in nosetests > assert(i1 == i2) # sometimes in nosetests > assert(i1 == MySymbol('i')) # sometimes in nosetests > assert(i2 == MySymbol('i')) # in some other nosetests > > But, we can't say for sure anything about the import order above because it's in nose and can't reliably predict > which assertions pass and which fail. These assertions would actually come from > generators that yield tests for nose. You can see the changes we found we had to make to 'fix' our failing test, with some comments on our confusion here: http://bazaar.launchpad.net/~nipy-developers/nipy/trunk/revision/1799<http://bazaar.launchpad.net/%7Enipy-developers/nipy/trunk/revision/1799> Thanks for any help, Jonathan Taylor -- Jonathan Taylor Dept. of Statistics Sequoia Hall, 137 390 Serra Mall Stanford, CA 94305 Tel: 650.723.9230 Fax: 650.725.8977 Web: http://www-stat.stanford.edu/~jtaylo -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sy...@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.