unittest2pytest icon indicating copy to clipboard operation
unittest2pytest copied to clipboard

Would be nice: fix assertEqual with singletons

Open nedbat opened this issue 4 years ago • 0 comments

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 avatar Jan 31 '21 14:01 nedbat