Skip to content

Commit fb9af7e

Browse files
authored
Merge pull request #107 from dogukancagatay/fix-python-314-test-failure
Fix test failure in Python 3.14a
2 parents 9cfb51f + a8337b5 commit fb9af7e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/test_plugin.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import pytest
77
from _pytest.main import ExitCode # type: ignore[attr-defined]
8+
from pytest_split.algorithms import Algorithms
89

910
pytest_plugins = ["pytester"]
1011

@@ -353,10 +354,11 @@ def test_returns_nonzero_when_invalid_algorithm_name(self, example_suite, capsys
353354
assert result.ret == ExitCode.USAGE_ERROR
354355

355356
outerr = capsys.readouterr()
356-
assert (
357-
"argument --splitting-algorithm: invalid choice: 'NON_EXISTENT' "
358-
"(choose from 'duration_based_chunks', 'least_duration')"
359-
) in outerr.err
357+
for err_content in [
358+
"argument --splitting-algorithm: invalid choice: 'NON_EXISTENT' ",
359+
*Algorithms.names(),
360+
]:
361+
assert err_content in outerr.err
360362

361363

362364
class TestHasExpectedOutput:

0 commit comments

Comments
 (0)