Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failure with python 3.13 #103

Open
xdbob opened this issue Aug 13, 2024 · 0 comments · May be fixed by #104
Open

Test failure with python 3.13 #103

xdbob opened this issue Aug 13, 2024 · 0 comments · May be fixed by #104

Comments

@xdbob
Copy link

xdbob commented Aug 13, 2024

Unit tests are failing with python 3.13 (found on fedora rawhide):

======================================================================
FAIL: testDefaultEnumScope (usb1.testUSB1.USBTransferTests.testDefaultEnumScope)
Enum instances must only affect the scope they are created in.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/xx/pkg/usb1/testUSB1.py", line 289, in testDefaultEnumScope
    self.assertEqual(local_dict.get(ENUM_NAME), ENUM_VALUE)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: None != 42

----------------------------------------------------------------------
Ran 13 tests in 0.079s

My understanding of the situation is that the test is not compatible with the new PEP 667, specifically the following change:

For function scopes it will return an instantaneous snapshot of the underlying frame.f_locals.

eg: we do the variable assignment after we took a snapshot of the locals.

Downstream fedora bug report: https://bugzilla.redhat.com/show_bug.cgi?id=2280555

@xdbob xdbob linked a pull request Aug 13, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant