Skip to content

Commit

Permalink
Merge pull request #1325 from penguinpee/master
Browse files Browse the repository at this point in the history
Replace deprecated setup() and teardown()
  • Loading branch information
effigies authored May 29, 2024
2 parents f40ac39 + 82c8588 commit e6ccec4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion nibabel/streamlines/tests/test_streamlines.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
DATA = {}


def setup():
def setup_module():
global DATA
DATA['empty_filenames'] = [pjoin(data_path, 'empty' + ext) for ext in FORMATS.keys()]
DATA['simple_filenames'] = [pjoin(data_path, 'simple' + ext) for ext in FORMATS.keys()]
Expand Down
4 changes: 2 additions & 2 deletions nibabel/tests/test_deprecated.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
from nibabel.tests.test_deprecator import TestDeprecatorFunc as _TestDF


def setup():
def setup_module():
# Hack nibabel version string
pkg_info.cmp_pkg_version.__defaults__ = ('2.0',)


def teardown():
def teardown_module():
# Hack nibabel version string back again
pkg_info.cmp_pkg_version.__defaults__ = (pkg_info.__version__,)

Expand Down
2 changes: 1 addition & 1 deletion nibabel/tests/test_dft.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
data_dir = pjoin(dirname(__file__), 'data')


def setUpModule():
def setup_module():
if os.name == 'nt':
raise unittest.SkipTest('FUSE not available for windows, skipping dft tests')
if not have_dicom:
Expand Down

0 comments on commit e6ccec4

Please sign in to comment.