From aafe079d3bc2928c159cf2ecaa9fbdb3f6520e02 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 3 Oct 2018 10:08:20 -0400 Subject: [PATCH 1/2] BF: do not check sympy implementation details (ie for _imp_) --- nipy/modalities/fmri/tests/test_aliases.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nipy/modalities/fmri/tests/test_aliases.py b/nipy/modalities/fmri/tests/test_aliases.py index 9e59323431..18593b4a96 100644 --- a/nipy/modalities/fmri/tests/test_aliases.py +++ b/nipy/modalities/fmri/tests/test_aliases.py @@ -42,9 +42,8 @@ def test_implemented_function(): assert_equal(l2(3), np.sqrt(3)) # check that we can pass in a sympy function as input func = sympy.Function('myfunc') - assert_false(hasattr(func, '_imp_')) f = implemented_function(func, lambda x: 2*x) - assert_true(hasattr(func, '_imp_')) + assert(f) def test_lambdify(): From 9f435191a420bf416ded3c32123fb2aa1163256a Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Thu, 10 Jan 2019 11:01:48 -0500 Subject: [PATCH 2/2] BF: import nosetester explicitely for a doctest Otherwise it leads to failures with fresh numpy where testing.nosetester is not automatically imported. See e.g. https://travis-ci.org/nipy/nipy/jobs/442714642 --- nipy/fixes/numpy/testing/nosetester.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nipy/fixes/numpy/testing/nosetester.py b/nipy/fixes/numpy/testing/nosetester.py index 4be245dbe2..39460882e0 100644 --- a/nipy/fixes/numpy/testing/nosetester.py +++ b/nipy/fixes/numpy/testing/nosetester.py @@ -21,7 +21,8 @@ def get_package_name(filepath): Examples -------- - >>> np.testing.nosetester.get_package_name('nonsense') + >>> from numpy.testing import nosetester + >>> nosetester.get_package_name('nonsense') 'numpy' """