Skip to content
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

Catching too many warnings, tests fail #691

Closed
ashgillman opened this issue Nov 9, 2018 · 2 comments
Closed

Catching too many warnings, tests fail #691

ashgillman opened this issue Nov 9, 2018 · 2 comments
Labels

Comments

@ashgillman
Copy link

Hi,

I am maintaining a Nix packages for Nibabel, here:
https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/python-modules/nibabel/default.nix

I have a few tests fail:

======================================================================
FAIL: nibabel.gifti.tests.test_giftiio.test_read_deprecated
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/nix/store/khj4yg8583s59wyg1vijj005qvaqiqnk-python3.6-nose-1.3.7/lib/python3.6/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/tmp/nix-build-python3.6-nibabel-2.3.1.drv-0/nibabel-2.3.1/nibabel/gifti/tests/test_giftiio.py", line 36, in test_read_deprecated
    assert_equal(len(w), 1)
AssertionError: 2 != 1

======================================================================
FAIL: nibabel.gifti.tests.test_parse_gifti_fast.test_parse_dataarrays
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/nix/store/khj4yg8583s59wyg1vijj005qvaqiqnk-python3.6-nose-1.3.7/lib/python3.6/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/tmp/nix-build-python3.6-nibabel-2.3.1.drv-0/nibabel-2.3.1/nibabel/gifti/tests/test_parse_gifti_fast.py", line 358, in test_parse_dataarrays
    assert_equal(len(w), 1)
AssertionError: 2 != 1

======================================================================
FAIL: test_load_file_with_wrong_information (nibabel.streamlines.tests.test_trk.TestTRK)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/nix-build-python3.6-nibabel-2.3.1.drv-0/nibabel-2.3.1/nibabel/streamlines/tests/test_trk.py", line 135, in test_load_file_with_wrong_information
    assert_equal(len(w), 1)
AssertionError: 2 != 1

======================================================================
FAIL: test_load_trk_version_1 (nibabel.streamlines.tests.test_trk.TestTRK)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/nix-build-python3.6-nibabel-2.3.1.drv-0/nibabel-2.3.1/nibabel/streamlines/tests/test_trk.py", line 186, in test_load_trk_version_1
    assert_equal(len(w), 1)
AssertionError: 2 != 1

======================================================================
FAIL: nibabel.tests.test_minc1.test_old_namespace
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/nix/store/khj4yg8583s59wyg1vijj005qvaqiqnk-python3.6-nose-1.3.7/lib/python3.6/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/tmp/nix-build-python3.6-nibabel-2.3.1.drv-0/nibabel-2.3.1/nibabel/tests/test_minc1.py", line 145, in test_old_namespace
    assert_equal(warns.pop(0).category, FutureWarning)
AssertionError: <class 'DeprecationWarning'> != <class 'FutureWarning'>

======================================================================
FAIL: nibabel.tests.test_nifti1.test_extension_io
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/nix/store/khj4yg8583s59wyg1vijj005qvaqiqnk-python3.6-nose-1.3.7/lib/python3.6/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/tmp/nix-build-python3.6-nibabel-2.3.1.drv-0/nibabel-2.3.1/nibabel/tests/test_nifti1.py", line 1167, in test_extension_io
    assert_equal(len(warns), 1)
AssertionError: 2 != 1

----------------------------------------------------------------------
Ran 7625 tests in 116.361s

They seem to be all related to catching warnings. Any idea what the issue may be?

Cheers,
Ash

@effigies
Copy link
Member

Hi @ashgillman, sorry for the extremely slow response. I'm going to guess, based on the 5th entry, that some non-nibabel-related DeprecationWarning is getting raised in addition to the warnings we're expecting. I'd also guess that it's going to be a numpy issue. Are you still seeing this with the latest release and current master?

@ashgillman
Copy link
Author

Yes, I believe this has been taken care of. Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants