Skip to content

Commit

Permalink
Update config tests to include the recursion option.
Browse files Browse the repository at this point in the history
  • Loading branch information
johndoknjas committed Oct 23, 2024
1 parent a3d4e9e commit 3781310
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def test_cli_args():
min_confidence=10,
sort_by_size=True,
verbose=True,
recursion=True,
)
result = _parse_args(
[
Expand All @@ -51,6 +52,7 @@ def test_cli_args():
"--verbose",
"path1",
"path2",
"-r",
]
)
assert isinstance(result, dict)
Expand All @@ -70,6 +72,7 @@ def test_toml_config():
min_confidence=10,
sort_by_size=True,
verbose=True,
recursion=True,
)
data = get_toml_bytes(
dedent(
Expand All @@ -82,6 +85,7 @@ def test_toml_config():
min_confidence = 10
sort_by_size = true
verbose = true
recursion = true
paths = ["path1", "path2"]
"""
)
Expand Down Expand Up @@ -146,6 +150,7 @@ def test_config_merging():
min_confidence = 10
sort_by_size = false
verbose = false
recursion = false
paths = ["toml_path"]
"""
)
Expand All @@ -158,6 +163,7 @@ def test_config_merging():
"--min-confidence=20",
"--sort-by-size",
"--verbose",
"--recursion",
"cli_path",
]
result = make_config(cliargs, toml)
Expand All @@ -171,6 +177,7 @@ def test_config_merging():
min_confidence=20,
sort_by_size=True,
verbose=True,
recursion=True,
)
assert result == expected

Expand Down

0 comments on commit 3781310

Please sign in to comment.