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

ENH: First attempt at multiframe support (3D only for now) #84

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

moloney
Copy link
Owner

@moloney moloney commented Feb 10, 2023

No description provided.

emollier and others added 14 commits May 29, 2024 14:17
As pointed out in [Debian bugs #1063943] and [then #1071794],
test/test_cli.py fails with pytest 8 and beyon with the following
symptoms:

	__________________________ TestDcmstackCli.test_basic __________________________

	self = <test.test_cli.TestDcmstackCli object at 0x7f2d3a00eb40>

	    def test_basic(self):
	>       nii_paths = make_niftis(self.out_dir)
	E       AttributeError: 'TestDcmstackCli' object has no attribute 'out_dir'

	test/test_cli.py:55: AttributeError
	__________________________ TestDcmstackCli.test_embed __________________________

	self = <test.test_cli.TestDcmstackCli object at 0x7f2d3c976180>

	    def test_embed(self):
	>       nii_paths = make_niftis(self.out_dir, ['--embed'])
	E       AttributeError: 'TestDcmstackCli' object has no attribute 'out_dir'

	test/test_cli.py:59: AttributeError
	___________________________ TestNitoolCli.test_basic ___________________________

	self = <test.test_cli.TestNitoolCli object at 0x7f2d39f5b1d0>

	    def test_basic(self):
	>       nii_path = make_niftis(self.out_dir, ['--embed'])[0]
	E       AttributeError: 'TestNitoolCli' object has no attribute 'out_dir'

	test/test_cli.py:65: AttributeError

This is because pytest 8 deprecated the use of plain _setup_ and
_teardown_, which were compatibility layers to ease the porting effort
from Nose.  This change ensures methods inheriting from CliTest get
set up and teared down properly.

[Debian bugs #1063943]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1063943
[then #1071794]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1071794

Signed-off-by: Étienne Mollier <emollier@debian.org>
t/test_cli.py: port setup/teardown to pytest 8.
prefer newer unittest.mock from standard library
Have to disable rescaling with monkey patching...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants