-
Notifications
You must be signed in to change notification settings - Fork 83
Test collection fails with KeyError 'runtest' for test_algorithm.py with pytest 8.2.0 #510
Copy link
Copy link
Closed
Description
Fedora is preparing for upgrading pytest to 8.x. Running tests for NiaPy 2.1.0 with pytest 8.2.0 fails when collecting tests:
==================================================================================================================================== ERRORS ====================================================================================================================================
___________________________________________________________________________________________________________________ ERROR collecting tests/test_algorithm.py ___________________________________________________________________________________________________________________
niapy/task.py:79: in __init__
self.problem = get_problem(problem, **params)
niapy/util/factory.py:19: in get_problem
problem = _problem_options().pop(name.lower())
E KeyError: 'runtest'
=========================================================================================================================== short test summary info ============================================================================================================================
ERROR tests/test_algorithm.py::TestingTask - KeyError: 'runtest'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
=============================================================================================================================== 1 error in 0.89s ===============================================================================================================================It only fails for test_algorithm.py. When running with --ignore tests/test_algorithm.py all remaining tests pass. I'm clueless as to what changed or how to fix this. With pytest 7.4.3 (current version in Fedora) all tests pass.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels