BTW, I stumbled on something strange with the nose framework. If you from numpy.testing import * in a test file, the nose framework will try to test the testing module by calling every test* method.
I just mention it there because I think I'm not the only one to do this for set_package_path, assert_equal, ... Matthieu 2008/4/7, Gael Varoquaux <[hidden email]>: On Mon, Apr 07, 2008 at 05:20:47PM +0200, Stéfan van der Walt wrote: -- French PhD student Website : http://matthieu-brucher.developpez.com/ Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92 LinkedIn : http://www.linkedin.com/in/matthieubrucher _______________________________________________ Numpy-discussion mailing list [hidden email] http://projects.scipy.org/mailman/listinfo/numpy-discussion |
On 07/04/2008, Matthieu Brucher <[hidden email]> wrote:
> BTW, I stumbled on something strange with the nose framework. If you from > numpy.testing import * in a test file, the nose framework will try to test > the testing module by calling every test* method. > > I just mention it there because I think I'm not the only one to do this for > set_package_path, assert_equal, ... I've noticed that behaviour, too. Note, however, that you do not need to use set_package_path and friends with nose; you can instead do a fully qualified import: from numpy.submod.mod import foo Regards Stéfan _______________________________________________ Numpy-discussion mailing list [hidden email] http://projects.scipy.org/mailman/listinfo/numpy-discussion |
Hi,
On Mon, Apr 7, 2008 at 4:25 PM, Stéfan van der Walt <[hidden email]> wrote: > On 07/04/2008, Matthieu Brucher <[hidden email]> wrote: > > BTW, I stumbled on something strange with the nose framework. If you from > > numpy.testing import * in a test file, the nose framework will try to test > > the testing module by calling every test* method. > > > > I just mention it there because I think I'm not the only one to do this for > > set_package_path, assert_equal, ... > > I've noticed that behaviour, too. Note, however, that you do not need > to use set_package_path and friends with nose; you can instead do a > fully qualified import: > > from numpy.submod.mod import foo Actually, it was intentional to make the scipy.testing * space a more limited version of the numpy testing space - in particular, set_package_path was often being used unnecessarily (by me among others) and was clearly leading to confusion. You do however have assert_equal and friends with from scipy.testing import *, so I'd strongly recommend you use that in preference to the numpy.testing import within scipy. Best, Matthew _______________________________________________ Numpy-discussion mailing list [hidden email] http://projects.scipy.org/mailman/listinfo/numpy-discussion |
Free forum by Nabble | Edit this page |