New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests fail after windows 32 bit installation and running import dipy; dipy.test() #306

Closed
Garyfallidis opened this Issue Jan 4, 2014 · 7 comments

Comments

Projects
None yet
3 participants
@Garyfallidis
Member

Garyfallidis commented Jan 4, 2014

After installing Canopy or Anaconda in windows and then installing nibabel, dipy and typing

import dipy
dipy.test()

I get the following errors:

ERROR: dipy.io.tests.test_dpy.test_dpy

Traceback (most recent call last):
File "C:\Documents and Settings\User\Anaconda\lib\site-packages\nose\case.py", line 197, in runTest
self.test(_self.arg)
File "C:\Documents and Settings\User\Anaconda\lib\site-packages\numpy\testing\decorators.py", line 146, in skipper_func
return f(_args, **kwargs)
File "C:\Documents and Settings\User\Anaconda\lib\site-packages\dipy\io\tests\test_dpy.py", line 39, in test_dpy
os.remove(fname)
WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'c:\docume1\User\loca
ls
1\temp\tmpz5tyqk'

ERROR: dipy.tests.test_scripts.test_dipy_fit_tensor

Traceback (most recent call last):
File "C:\Documents and Settings\User\Anaconda\lib\site-packages\nose\case.py", line 197, in runTest
self.test(*self.arg)
File "C:\Documents and Settings\User\Anaconda\lib\site-packages\dipy\tests\test_scripts.py", line 112, in test_dipy_fit_tensor
out = run_command(" ".join(cmd))
File "C:\Documents and Settings\User\Anaconda\lib\site-packages\dipy\tests\test_scripts.py", line 69, in run_command
% (cmd, stdout, stderr))
RuntimeError: Command "dipy_fit_tensor --mask=none small_25.nii.gz" failed with stdout

stderr
'C:\Documents' is not recognized as an internal or external command,
operable program or batch file.

ERROR: dipy.tests.test_scripts.test_qb_commandline

Traceback (most recent call last):
File "C:\Documents and Settings\User\Anaconda\lib\site-packages\nose\case.py", line 197, in runTest
self.test(_self.arg)
File "C:\Documents and Settings\User\Anaconda\lib\site-packages\numpy\testing\decorators.py", line 146, in skipper_func
return f(_args, **kwargs)
File "C:\Documents and Settings\User\Anaconda\lib\site-packages\dipy\tests\test_scripts.py", line 165, in test_qb_commandline
out = run_command(" ".join(cmd))
File "C:\Documents and Settings\User\Anaconda\lib\site-packages\dipy\tests\test_scripts.py", line 69, in run_command
% (cmd, stdout, stderr))
RuntimeError: Command "dipy_quickbundles C:\Documents and Settings\User\Anaconda\lib\site-packages\dipy\data\tracks300.trk --pkl_f
ile ./mypickle.pkl --out_file ./tracks300.trk" failed with stdout

stderr
'C:\Documents' is not recognized as an internal or external command,
operable program or batch file.

FAIL: dipy.reconst.tests.test_interpolate.test_TriLinearInterpolator

Traceback (most recent call last):
File "C:\Documents and Settings\User\Anaconda\lib\site-packages\nose\case.py", line 197, in runTest
self.test(*self.arg)
File "C:\Documents and Settings\User\Anaconda\lib\site-packages\dipy\reconst\tests\test_interpolate.py", line 44, in test_TriLin
earInterpolator
assert_array_almost_equal(tli[x, y, z], expected_result)
File "C:\Documents and Settings\User\Anaconda\lib\site-packages\numpy\testing\utils.py", line 812, in assert_array_almost_equal
header=('Arrays are not almost equal to %d decimals' % decimal))
File "C:\Documents and Settings\User\Anaconda\lib\site-packages\numpy\testing\utils.py", line 645, in assert_array_compare
raise AssertionError(msg)
AssertionError:
Arrays are not almost equal to 6 decimals

(mismatch 25.0%)
x: array([ 15.5 , 16.5 , 17.50000191, 18.5 ], dtype=float32)
y: array([ 15.5, 16.5, 17.5, 18.5])

FAIL: dipy.tests.test_scripts.test_dipy_peak_extraction

Traceback (most recent call last):
File "C:\Documents and Settings\User\Anaconda\lib\site-packages\nose\case.py", line 197, in runTest
self.test(*self.arg)
File "C:\Documents and Settings\User\Anaconda\lib\site-packages\dipy\tests\test_scripts.py", line 77, in test_dipy_peak_extracti
on
assert_equal(code, 2)
AssertionError: 1 != 2

FAIL: dipy.tests.test_scripts.test_dipy_sh_estimate

Traceback (most recent call last):
File "C:\Documents and Settings\User\Anaconda\lib\site-packages\nose\case.py", line 197, in runTest
self.test(*self.arg)
File "C:\Documents and Settings\User\Anaconda\lib\site-packages\dipy\tests\test_scripts.py", line 91, in test_dipy_sh_estimate
assert_equal(code, 2)
AssertionError: 1 != 2


Ran 210 tests in 700.922s

FAILED (SKIP=1, errors=3, failures=3)
Out[4]: <nose.result.TextTestResult run=210 errors=3 failures=3>

@arokem

This comment has been minimized.

Member

arokem commented Jan 5, 2014

Why is this working on the buildbots? Any idea?

On Sat, Jan 4, 2014 at 1:35 PM, Eleftherios Garyfallidis <
notifications@github.com> wrote:

After installing Canopy or Anaconda in windows and then installing
nibabel, dipy and typing

import dipy
dipy.test()

I get the following errors:
ERROR: dipy.io.tests.test_dpy.test_dpy

Traceback (most recent call last):
File "C:\Documents and
Settings\User\Anaconda\lib\site-packages\nose\case.py", line 197, in runTest
self.test(

_self.arg) File "C:\Documents and
Settings\User\Anaconda\lib\site-packages\numpy\testing\decorators.py", line
146, in skipper_func return f(_args, **kwargs)
File "C:\Documents and
Settings\User\Anaconda\lib\site-packages\dipy\io\tests\test_dpy.py", line
39, in test_dpy
os.remove(fname)
WindowsError: [Error 32] The process cannot access the file because it is
being used by another process: 'c:\docume1\User\loca
ls
1\temp\tmpz5tyqk'
ERROR: dipy.tests.test_scripts.test_dipy_fit_tensor

Traceback (most recent call last):
File "C:\Documents and
Settings\User\Anaconda\lib\site-packages\nose\case.py", line 197, in runTest
self.test(*self.arg)
File "C:\Documents and
Settings\User\Anaconda\lib\site-packages\dipy\tests\test_scripts.py", line
112, in test_dipy_fit_tensor
out = run_command(" ".join(cmd))
File "C:\Documents and
Settings\User\Anaconda\lib\site-packages\dipy\tests\test_scripts.py", line
69, in run_command
% (cmd, stdout, stderr))
RuntimeError: Command "dipy_fit_tensor --mask=none small_25.nii.gz" failed
with stdout

stderr
'C:\Documents' is not recognized as an internal or external command,
operable program or batch file.
ERROR: dipy.tests.test_scripts.test_qb_commandline

Traceback (most recent call last):
File "C:\Documents and
Settings\User\Anaconda\lib\site-packages\nose\case.py", line 197, in runTest
self.test(

_self.arg) File "C:\Documents and
Settings\User\Anaconda\lib\site-packages\numpy\testing\decorators.py", line
146, in skipper_func return f(_args, **kwargs)
File "C:\Documents and
Settings\User\Anaconda\lib\site-packages\dipy\tests\test_scripts.py", line
165, in test_qb_commandline
out = run_command(" ".join(cmd))
File "C:\Documents and
Settings\User\Anaconda\lib\site-packages\dipy\tests\test_scripts.py", line
69, in run_command
% (cmd, stdout, stderr))
RuntimeError: Command "dipy_quickbundles C:\Documents and
Settings\User\Anaconda\lib\site-packages\dipy\data\tracks300.trk --pkl_f
ile ./mypickle.pkl --out_file ./tracks300.trk" failed with stdout

stderr
'C:\Documents' is not recognized as an internal or external command,
operable program or batch file.
FAIL: dipy.reconst.tests.test_interpolate.test_TriLinearInterpolator

Traceback (most recent call last):
File "C:\Documents and
Settings\User\Anaconda\lib\site-packages\nose\case.py", line 197, in runTest
self.test(*self.arg)
File "C:\Documents and
Settings\User\Anaconda\lib\site-packages\dipy\reconst\tests\test_interpolate.py",
line 44, in test_TriLin
earInterpolator
assert_array_almost_equal(tli[x, y, z], expected_result)
File "C:\Documents and
Settings\User\Anaconda\lib\site-packages\numpy\testing\utils.py", line 812,
in assert_array_almost_equal
header=('Arrays are not almost equal to %d decimals' % decimal))
File "C:\Documents and
Settings\User\Anaconda\lib\site-packages\numpy\testing\utils.py", line 645,
in assert_array_compare
raise AssertionError(msg)
AssertionError:
Arrays are not almost equal to 6 decimals

(mismatch 25.0%)
x: array([ 15.5 , 16.5 , 17.50000191, 18.5 ], dtype=float32)
y: array([ 15.5, 16.5, 17.5, 18.5])
FAIL: dipy.tests.test_scripts.test_dipy_peak_extraction

Traceback (most recent call last):
File "C:\Documents and
Settings\User\Anaconda\lib\site-packages\nose\case.py", line 197, in runTest
self.test(*self.arg)
File "C:\Documents and
Settings\User\Anaconda\lib\site-packages\dipy\tests\test_scripts.py", line
77, in test_dipy_peak_extracti
on
assert_equal(code, 2)
AssertionError: 1 != 2
FAIL: dipy.tests.test_scripts.test_dipy_sh_estimate

Traceback (most recent call last):
File "C:\Documents and
Settings\User\Anaconda\lib\site-packages\nose\case.py", line 197, in runTest
self.test(*self.arg)
File "C:\Documents and
Settings\User\Anaconda\lib\site-packages\dipy\tests\test_scripts.py", line
91, in test_dipy_sh_estimate
assert_equal(code, 2)

AssertionError: 1 != 2

Ran 210 tests in 700.922s

FAILED (SKIP=1, errors=3, failures=3)
Out[4]:


Reply to this email directly or view it on GitHubhttps://github.com//issues/306
.

@matthew-brett

This comment has been minimized.

Member

matthew-brett commented Jan 6, 2014

Test 1 is because we don't test with pytables on the windows buildbots - maybe we should. There's a comment the line before the failure:

# This might cause problems on windows

I've put up a refactor of the test that might help on my 'windows-test-fixes' branch - will continue tomorrow.

Then there are a series of failures where we're testing scripts, and the path to the scripts have a space in them, so the shell gets confused. That shouldn't be too hard to fix.

Then there is a small precision error - maybe someone can check if the precision is enough?

Then there are a couple of 1 != 2 errors I don't understand...

@matthew-brett

This comment has been minimized.

Member

matthew-brett commented Jan 6, 2014

Sorry - scratch the 1!=2 comment - I see those are in script testing also - probably secondary to the spaces problem, but I'll investigate.

@arokem

This comment has been minimized.

Member

arokem commented Jan 6, 2014

The precision error (17.5 != 17.50000191) seems harmless to me. I will make
a PR against your branch with a fix for that.

On Sun, Jan 5, 2014 at 4:50 PM, Matthew Brett notifications@github.comwrote:

Test 1 is because we don't test with pytables on the windows buildbots -
maybe we should. There's a comment the line before the failure:

This might cause problems on windows

I've put up a refactor of the test that might help on my
'windows-test-fixes' branch - will continue tomorrow.

Then there are a series of failures where we're testing scripts, and the
path to the scripts have a space in them, so the shell gets confused. That
shouldn't be too hard to fix.

Then there is a small precision error - maybe someone can check if the
precision is enough?

Then there are a couple of 1 != 2 errors I don't understand...


Reply to this email directly or view it on GitHubhttps://github.com//issues/306#issuecomment-31621092
.

@matthew-brett

This comment has been minimized.

Member

matthew-brett commented Jan 10, 2014

OK - the failing tests seem to pass with this branch : #309

@matthew-brett

This comment has been minimized.

Member

matthew-brett commented Jan 10, 2014

Have test failure elsewhere though: #310

@arokem

This comment has been minimized.

Member

arokem commented Jan 11, 2014

Closed through #309

@arokem arokem closed this Jan 11, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment