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

Would be nice: fix assertEqual with singletons #52

Open
nedbat opened this issue Jan 31, 2021 · 0 comments
Open

Would be nice: fix assertEqual with singletons #52

nedbat opened this issue Jan 31, 2021 · 0 comments

Comments

@nedbat
Copy link

nedbat commented Jan 31, 2021

Currently, unittest2pytest converts this:

self.assertEqual(thing, None)

to:

assert thing == None

which pylint then complains about (as it should).

Arguably, the original line was wrong, but it would be a nice touch if unittest2pytest noticed the value and converted it to:

assert thing is None
nedbat added a commit to nedbat/coveragepy that referenced this issue Jan 31, 2021
I guess the original line was wrong, but it would have been nice for
unittest2pytest to fix it for me:
pytest-dev/unittest2pytest#52
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

No branches or pull requests

1 participant