pytest-dev / nose2pytest

Scripts to convert Python Nose tests to PyTest
Other
38 stars 12 forks source link

Wrong conversion of asserts #7

Closed PhilippSelenium closed 4 years ago

PhilippSelenium commented 4 years ago

ACT:

assert_false(foo)
assert not foo

EXP

assert_false(foo)
assert foo is False

Same for assert_true

PhilippSelenium commented 4 years ago

Looking at the description in https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertTrue I see that I should use assert_is in such cases.