You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def _callTestMethod(self, method):
> if method() is not None:
E TypeError: TestPytest.test_demo() missing 1 required positional argument: 'foo'
While the following works just fine:
- class TestPytest(TestCase):+ class TestPytest:
The text was updated successfully, but these errors were encountered:
DanielYang59
changed the title
[Dev/Test] Migrate PymatgenTest from TestCase to pytest
[Dev/Test] Migrate PymatgenTest from unittest.TestCase to pytestNov 29, 2024
Current
pytest
framework isn't fully compatible withunittest.TestCase
, we should consider migrate topytest
framework:For example
pytest.mark.parametrize
doesn't work:parametrize
in unittest.TestCase pytest-dev/pytest#5382Gives:
While the following works just fine:
The text was updated successfully, but these errors were encountered: