Skip to content

Replace deprecated setup() and teardown() #1325

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

Merged
merged 1 commit into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading