moloney / dcmstack

DICOM to Nifti conversion with meta data preservation
Other
72 stars 51 forks source link

test error with Python3.8 #67

Closed bcdarwin closed 1 year ago

bcdarwin commented 4 years ago

Running the tests for v0.8 with nose 1.3.7, nibabel 3.0.1, and pydicom 1.4.1 on Linux (NixOS):

======================================================================
ERROR: test.test_dcmmeta.TestGetMeta.test_invalid_index
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/nix/store/c7sf35dvi8pffp5ynj3icfc1czgikbc8-python3.8-nose-1.3.7/lib/python3.8/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/source/test/test_dcmmeta.py", line 991, in test_invalid_index
    assert_raises(IndexError,
  File "/nix/store/k82p3h05vbca3k5f1in5iavgbqxq03bm-python3-3.8.2/lib/python3.8/unittest/case.py", line 816, in assertRaises
    return context.handle('assertRaises', args, kwargs)
  File "/nix/store/k82p3h05vbca3k5f1in5iavgbqxq03bm-python3-3.8.2/lib/python3.8/unittest/case.py", line 202, in handle
    callable_obj(*args, **kwargs)
TypeError: 'NoneType' object is not callable

----------------------------------------------------------------------
moloney commented 4 years ago

Thanks for reporting. This seems like a bug in nose with python 3.8, but haven't looked in great depth.

tillea commented 2 years ago

Any news about this? The bug persists in python 3.9 and is affecting the Debian packaged version of dcmstack. You can find a full build log of the Debian CI here.

tillea commented 2 years ago

Nilesh Patra recommends using pytest instead of nose and created an according patch which enables running the full test suite now. Feel free to incorporate this in your next release.

TheChymera commented 1 year ago

@moloney I would whole-heartedly recommend merging @tillea 's patch. I ran into the same issue and it solved it.