Commit ecd9a4ba authored by Stefan Behnel's avatar Stefan Behnel

Make a test Py3.10 compatible.

parent eb6d31a5
...@@ -33,10 +33,10 @@ True ...@@ -33,10 +33,10 @@ True
Traceback (most recent call last): Traceback (most recent call last):
NameError: ...name 'RANK_3' is not defined NameError: ...name 'RANK_3' is not defined
>>> set(PyxEnum) == set([TWO, THREE, FIVE]) >>> set(PyxEnum) == {TWO, THREE, FIVE}
True True
>>> str(PyxEnum.TWO) >>> str(PyxEnum.TWO).split(".")[-1] # Py3.10 changed the output here
'PyxEnum.TWO' 'TWO'
>>> PyxEnum.TWO + PyxEnum.THREE == PyxEnum.FIVE >>> PyxEnum.TWO + PyxEnum.THREE == PyxEnum.FIVE
True True
>>> PyxEnum(2) is PyxEnum["TWO"] is PyxEnum.TWO >>> PyxEnum(2) is PyxEnum["TWO"] is PyxEnum.TWO
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment