Skip to content

Would be nice: fix assertEqual with singletons #52

@nedbat

Description

@nedbat

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions