Skip to content

Commit

Permalink
test: flynt cli flags and config option
Browse files Browse the repository at this point in the history
  • Loading branch information
okuuva authored and akaihola committed Dec 15, 2024
1 parent 2cf83e7 commit ac1ac12
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/darker/tests/test_command_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,24 @@ def get_darker_help_output(capsys):
expect_config=("isort", True),
expect_modified=("isort", True),
),
dict(
argv=["."],
expect_value=("flynt", False),
expect_config=("flynt", False),
expect_modified=("flynt", ...),
),
dict(
argv=["-f", "."],
expect_value=("flynt", True),
expect_config=("flynt", True),
expect_modified=("flynt", True),
),
dict(
argv=["--flynt", "."],
expect_value=("flynt", True),
expect_config=("flynt", True),
expect_modified=("flynt", True),
),
dict(
argv=["."],
expect_value=("lint", []),
Expand Down Expand Up @@ -280,6 +298,7 @@ def test_parse_command_line(
dict(config={"stdout": True}, expect_warn=set()),
dict(config={"check": True}, expect_warn=set()),
dict(config={"isort": True}, expect_warn=set()),
dict(config={"flynt": True}, expect_warn=set()),
dict(
config={"lint": ["dummy"]},
expect_warn={
Expand Down Expand Up @@ -694,6 +713,16 @@ def test_black_config_file_and_options(git_repo, config, options, expect):
{},
),
),
dict(
options=["--flynt", "a.py"],
expect=(
Path("git_root"),
{Path("a.py")},
Exclusions(isort={"**/*"}),
RevisionRange("HEAD", ":WORKTREE:"),
{},
),
),
dict(
options=["--config", "my.cfg", "a.py"],
expect=(
Expand Down

0 comments on commit ac1ac12

Please sign in to comment.