Skip to content

Commit

Permalink
Adjust --stdin-filename tests to new exit codes
Browse files Browse the repository at this point in the history
  • Loading branch information
akaihola committed Jul 29, 2024
1 parent 0d5b83a commit 7003e2a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/darker/tests/test_main_stdin_filename.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import toml

import darker.__main__
from darkgraylib.command_line import EXIT_CODE_CMDLINE_ERROR

Check failure on line 13 in src/darker/tests/test_main_stdin_filename.py

View workflow job for this annotation

GitHub Actions / Pylint

src/darker/tests/test_main_stdin_filename.py#L13

No name 'EXIT_CODE_CMDLINE_ERROR' in module 'darkgraylib.command_line' (no-name-in-module, E0611)

Check failure on line 13 in src/darker/tests/test_main_stdin_filename.py

View workflow job for this annotation

GitHub Actions / Mypy

src/darker/tests/test_main_stdin_filename.py#L13

Module "darkgraylib.command_line" has no attribute "EXIT_CODE_CMDLINE_ERROR" [attr-defined]
from darkgraylib.config import ConfigurationError
from darkgraylib.testtools.git_repo_plugin import GitRepoFixture
from darkgraylib.testtools.helpers import raises_if_exception
Expand All @@ -18,7 +19,7 @@


@pytest.mark.kwparametrize(
dict(expect=SystemExit(2)),
dict(expect=SystemExit(EXIT_CODE_CMDLINE_ERROR)),
dict(config_src=["a.py"], expect_a_py='modified = "a.py worktree"\n'),
dict(config_src=["b.py"], src=["a.py"], expect_a_py='modified = "a.py worktree"\n'),
dict(
Expand Down Expand Up @@ -125,8 +126,8 @@
" ':WORKTREE:'"
),
),
dict(revision="..:STDIN:", expect=SystemExit(2)),
dict(revision="..:WORKTREE:", expect=SystemExit(2)),
dict(revision="..:STDIN:", expect=SystemExit(EXIT_CODE_CMDLINE_ERROR)),
dict(revision="..:WORKTREE:", expect=SystemExit(EXIT_CODE_CMDLINE_ERROR)),
config_src=None,
src=[],
stdin_filename=None,
Expand Down

0 comments on commit 7003e2a

Please sign in to comment.