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

DeprecationWarning: unittest.findTestCases() is deprecated and will be removed in Python 3.13 #57

Closed
lxp opened this issue May 18, 2024 · 0 comments
Labels
code quality Improvement of code quality
Milestone

Comments

@lxp
Copy link
Member

lxp commented May 18, 2024

Traceback (most recent call last):
*** testing all_unittests_suite
  File "/home/runner/work/cfv/cfv/test/test.py", line 1606, in <module>
    all_unittest_tests()
  File "/home/runner/work/cfv/cfv/test/test.py", line 1542, in all_unittest_tests
    suite = cfvtest.all_unittests_suite()
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/cfv/cfv/test/cfvtest.py", line 245, in all_unittests_suite
    alltests.addTest(unittest.findTestCases(module))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/unittest/loader.py", line 489, in findTestCases
    warnings.warn(
DeprecationWarning: unittest.findTestCases() is deprecated and will be removed in Python 3.13. Please use unittest.TestLoader.loadTestsFromModule() instead.
@lxp lxp added the code quality Improvement of code quality label May 18, 2024
lxp added a commit that referenced this issue May 18, 2024
…ll be removed in Python 3.13

Fixes #57

```
Traceback (most recent call last):
*** testing all_unittests_suite
  File "/home/runner/work/cfv/cfv/test/test.py", line 1606, in <module>
    all_unittest_tests()
  File "/home/runner/work/cfv/cfv/test/test.py", line 1542, in all_unittest_tests
    suite = cfvtest.all_unittests_suite()
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/cfv/cfv/test/cfvtest.py", line 245, in all_unittests_suite
    alltests.addTest(unittest.findTestCases(module))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/unittest/loader.py", line 489, in findTestCases
    warnings.warn(
DeprecationWarning: unittest.findTestCases() is deprecated and will be removed in Python 3.13. Please use unittest.TestLoader.loadTestsFromModule() instead.
```
@lxp lxp added this to the 3.1 milestone May 18, 2024
lxp added a commit that referenced this issue May 19, 2024
…ll be removed in Python 3.13

Fixes #57

```
Traceback (most recent call last):
*** testing all_unittests_suite
  File "/home/runner/work/cfv/cfv/test/test.py", line 1606, in <module>
    all_unittest_tests()
  File "/home/runner/work/cfv/cfv/test/test.py", line 1542, in all_unittest_tests
    suite = cfvtest.all_unittests_suite()
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/cfv/cfv/test/cfvtest.py", line 245, in all_unittests_suite
    alltests.addTest(unittest.findTestCases(module))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/unittest/loader.py", line 489, in findTestCases
    warnings.warn(
DeprecationWarning: unittest.findTestCases() is deprecated and will be removed in Python 3.13. Please use unittest.TestLoader.loadTestsFromModule() instead.
```
@lxp lxp closed this as completed in a9bb6fb May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality Improvement of code quality
Projects
None yet
Development

No branches or pull requests

1 participant