Closed mgorny closed 2 years ago
Thanks for the report, I'll look at replicating and fixing the tests sometime soon.
These test failures are due to a change in how Python 3.11 stringifies an enum value.
import enum
class MyEnum(enum.IntEnum):
TEST = 1
print(MyEnum.TEST)
If you run that in Python 3.11 the printed value is 1
whereas in older Python 3 versions it will be MyEnum.TEST
. Considering Python 3.11 is still in the beta stages and this to me sounds like a bug on Python itself I'm not sure there's much I should be doing here. I'll keep this open and re-test when the first RC comes out.
I've opened an issue on the Cpython issue tracker https://github.com/python/cpython/issues/94763.
I'm pretty sure that's intentional change. I think you can get a consistent value by using MyEnum.TEST.name
and MyEnum.TEST.value
.
Thanks!
When running the test suite with Python 3.11.0b3, I get the following failures:
Failure tracebacks
```pytb ============================================================== FAILURES =============================================================== ____________________________________________ test_extract_asn1_tlv_invalid_universal_class ____________________________________________ def test_extract_asn1_tlv_invalid_universal_class(): expected = ( "Invalid ASN.1 OCTET STRING tags, actual tag class TagClass.universal and tag number " "TypeTagNumber.integer" ) with pytest.raises(ValueError, match=re.escape(expected)): > asn1.extract_asn1_tlv( asn1.ASN1Value(asn1.TagClass.universal, False, asn1.TypeTagNumber.integer, b"\x01"), asn1.TagClass.universal, asn1.TypeTagNumber.octet_string, ) expected = ('Invalid ASN.1 OCTET STRING tags, actual tag class TagClass.universal and tag ' 'number TypeTagNumber.integer') tests/test_asn1.py:110: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tlv = ASN1Value(tag_class=