bpo-38659: [Enum] do not check '_inverted_' during _test_simple_enum by ethanfurman · Pull Request #25566 · python/cpython
Depending on usage, it's possible for Flag members to have the _inverted_ attribute when they are testing, while the Flag being testing against will not have that attribute on its members -- so skip that comparison.