Skip to content

Python 3.13.0b1: AttributeError: module 'unittest' has no attribute 'makeSuite' #486

Closed
@befeleme

Description

@befeleme

unittest.makeSuite() has been removed from Python 3.13.0. Hence, running the tests is not successful:

+ /usr/bin/python3 -c 'import numexpr, sys; sys.exit(not numexpr.test().wasSuccessful())'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
    import numexpr, sys; sys.exit(not numexpr.test().wasSuccessful())
                                      ~~~~~~~~~~~~^^
  File "/builddir/build/BUILD/python-numexpr-2.8.5-build/numexpr-2.8.5/build/lib.linux-x86_64-cpython-313/numexpr/__init__.py", line 64, in test
    return numexpr.tests.test(verbosity=verbosity)
           ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/python-numexpr-2.8.5-build/numexpr-2.8.5/build/lib.linux-x86_64-cpython-313/numexpr/tests/test_numexpr.py", line 1153, in test
    return unittest.TextTestRunner(verbosity=verbosity).run(suite())
                                                            ~~~~~^^
  File "/builddir/build/BUILD/python-numexpr-2.8.5-build/numexpr-2.8.5/build/lib.linux-x86_64-cpython-313/numexpr/tests/test_numexpr.py", line 1180, in suite
    theSuite.addTest(unittest.makeSuite(test_numexpr))
                     ^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.13/unittest/__init__.py", line 80, in __getattr__
    raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Numexpr version:   2.8.5
NumPy version:     1.26.4
Python version:    3.13.0b1 (main, May 14 2024, 00:00:00) [GCC 14.1.1 20240522 (Red Hat 14.1.1-4)]
Platform:          linux-x86_64-#1 SMP PREEMPT_DYNAMIC Sat Jan 20 18:03:28 UTC 2024
CPU vendor:        
CPU model:         
CPU clock speed:    MHz
VML available?     False
Number of threads used by default: 2 (out of 2 detected cores)
Maximum number of threads: 64
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
AttributeError: module 'unittest' has no attribute 'makeSuite'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions