Skip to content

Commit

Permalink
Merge pull request #107 from dogukancagatay/fix-python-314-test-failure
Browse files Browse the repository at this point in the history
Fix test failure in Python 3.14a
  • Loading branch information
jerry-git authored Nov 15, 2024
2 parents 9cfb51f + a8337b5 commit fb9af7e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import pytest
from _pytest.main import ExitCode # type: ignore[attr-defined]
from pytest_split.algorithms import Algorithms

pytest_plugins = ["pytester"]

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

outerr = capsys.readouterr()
assert (
"argument --splitting-algorithm: invalid choice: 'NON_EXISTENT' "
"(choose from 'duration_based_chunks', 'least_duration')"
) in outerr.err
for err_content in [
"argument --splitting-algorithm: invalid choice: 'NON_EXISTENT' ",
*Algorithms.names(),
]:
assert err_content in outerr.err


class TestHasExpectedOutput:
Expand Down

0 comments on commit fb9af7e

Please sign in to comment.