-
Notifications
You must be signed in to change notification settings - Fork 346
cls.setUpClass() -> TypeError: 'NoneType' object is not callable #624
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
Comments
I've looked into this further. I come to the simplified test code to reproduce the error:
I don't have time to investigate any further right now :( |
It is caused by 8a52643. Used the following test: class TestUnittestMethods:
def test_setUpClass_new(self, django_testdir):
django_testdir.create_test_module('''
from django.test import testcases
class BaseCMSTestCase:
pass
class CMSTestCase(BaseCMSTestCase, testcases.TestCase):
pass
class FooBarTestCase(testcases.TestCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
class TestContact(CMSTestCase, FooBarTestCase):
def test_noop(self):
pass
''')
result = django_testdir.runpytest_subprocess('-v')
result.stdout.fnmatch_lines([
"*test_noop PASSED*",
])
assert result.ret == 0 /cc @adamchainz |
#625 appears to fix it, but it's not really clear to me currently. |
Hm! It seems that pytest fix this?!? Because the combination seems to work: pytest-django==3.3.2 On the other side: i didn't see any related information for this in https://github.com/pytest-dev/pytest/blob/master/CHANGELOG.rst#pytest-363-2018-07-04 |
I'm not sure pytest could have fixed this upstream, because it's entirely code within pytest-django that is affected. |
@jedie |
(also make sure to not accidentally use #625, of course ;)) |
Maybe related to: #598 ?!?
setup:
Think it's related to the upgrade:
EDIT: I test the down grade to
pytest-django==3.3.0
andpytest==3.6.1
and the test runs fine.The text was updated successfully, but these errors were encountered: