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

TestColorMaps.test_make|show_colormap fails with pytest #2533

Closed
olebole opened this issue Apr 12, 2020 · 1 comment
Closed

TestColorMaps.test_make|show_colormap fails with pytest #2533

olebole opened this issue Apr 12, 2020 · 1 comment
Labels
triage Triage needed

Comments

@olebole
Copy link
Contributor

olebole commented Apr 12, 2020

Bug report

Bug summary

When I use pytest for tests, the TestColorMaps.test_make_colormap and TestColorMaps.test_show_colormaps tests fail. Interestingly, this is not observed when running the tests with nosetest.

Code for reproduction

Run the tests with pytest

Actual outcome

=================================== FAILURES ===================================
_______________________ TestColorMaps.test_make_colormap _______________________

self = <unittest.case._Outcome object at 0x7fc84d03c730>
test_case = <yt.visualization.tests.test_color_maps.TestColorMaps testMethod=test_make_colormap>
isTest = True

    @contextlib.contextmanager
    def testPartExecutor(self, test_case, isTest=False):
        old_success = self.success
        self.success = True
        try:
>           yield

/usr/lib/python3.8/unittest/case.py:60: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3.8/unittest/case.py:676: in run
    self._callTestMethod(testMethod)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <yt.visualization.tests.test_color_maps.TestColorMaps testMethod=test_make_colormap>
method = <bound method requires_backend.<locals>.ffalse.<locals>.<lambda> of <yt.visualization.tests.test_color_maps.TestColorMaps testMethod=test_make_colormap>>

    def _callTestMethod(self, method):
>       method()
E       TypeError: <lambda>() takes 0 positional arguments but 1 was given

/usr/lib/python3.8/unittest/case.py:633: TypeError

Expected outcome

The tests succeed

Version Information

  • Operating System: Debian unstable
  • Python Version: 3.8
  • yt version: 3.6.0
  • Other Libraries (if applicable): pytest-4.6.9
@triage-new-issues triage-new-issues bot added the triage Triage needed label Apr 12, 2020
@olebole
Copy link
Contributor Author

olebole commented Apr 12, 2020

Oops, when rechecking the error this seems to be a problem in unittest... Although I have no idea what this could be. Please re-open if this is caused by a yt bug.

@olebole olebole closed this as completed Apr 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Triage needed
Projects
None yet
Development

No branches or pull requests

1 participant