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 failures with Python 3.13.0b1: AttributeError: module 'unittest' has no attribute 'findTestCases' #754

Open
mgorny opened this issue May 12, 2024 · 0 comments · May be fixed by #757
Open

Comments

@mgorny
Copy link

mgorny commented May 12, 2024

With Python 3.13.0b1:

$ python3.13 test/run_all_tests.py
Patching sys.path to test local version. Testing Version: 3.5
Traceback (most recent call last):                                                                                                     
  File "/tmp/portage/dev-python/pyserial-3.5-r2/work/pyserial-3.5/test/run_all_tests.py", line 40, in <module>
    testsuite = unittest.findTestCases(module)                                                                                         
                ^^^^^^^^^^^^^^^^^^^^^^                                                                                                 
  File "/usr/lib/python3.13/unittest/__init__.py", line 80, in __getattr__
    raise AttributeError(f"module {__name__!r} has no attribute {name!r}")  
AttributeError: module 'unittest' has no attribute 'findTestCases'
arkamar added a commit to arkamar/pyserial that referenced this issue Jun 7, 2024
The unittest.findTestCases function was deprecated in Python 3.11 and
later removed in Python 3.13. The TestLoader methods should be used
instead [1].

[1] https://docs.python.org/3.13/whatsnew/3.13.html#unittest

Fixes: pyserial#754
@arkamar arkamar linked a pull request Jun 7, 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