Skip to content

Commit fd3950c

Browse files
committed
Reformat test with ruff
1 parent d25ac22 commit fd3950c

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

‎tests/test_cli.py‎

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ def test_run_with_command_flags(dotenv_path):
288288
assert result.returncode == 0
289289
assert result.stdout.strip() == "--version"
290290

291+
291292
def test_run_with_dotenv_and_command_flags(cli, dotenv_path):
292293
"""
293294
Check that dotenv flags supersede command flags.
@@ -305,15 +306,21 @@ def test_run_with_dotenv_and_command_flags(cli, dotenv_path):
305306
@pytest.mark.parametrize(
306307
"files,file_contents,expected",
307308
(
308-
(['.env'], ['a=1'], {"a": "1"}),
309-
(['.env', '.env.secondary'], ['a=1', 'b=2'], {"a": "1", "b": "2"}),
310-
(['.env', '.env.secondary', '.env.extra'], ['a=1', 'a=3\nb=2', 'a=5\nc=3'], {"a": "5", "b": "2", "c": "3"}),
309+
([".env"], ["a=1"], {"a": "1"}),
310+
([".env", ".env.secondary"], ["a=1", "b=2"], {"a": "1", "b": "2"}),
311+
(
312+
[".env", ".env.secondary", ".env.extra"],
313+
["a=1", "a=3\nb=2", "a=5\nc=3"],
314+
{"a": "5", "b": "2", "c": "3"},
315+
),
311316
),
312317
)
313-
def test_run_with_multiple_env_files(tmp_path, files: Sequence[str], file_contents: Sequence[str], expected: dict):
318+
def test_run_with_multiple_env_files(
319+
tmp_path, files: Sequence[str], file_contents: Sequence[str], expected: dict
320+
):
314321
"""
315322
Test loading variables from two separate env files using file arguments.
316-
323+
317324
This demonstrates the pattern shown in the README where multiple env files
318325
are loaded (e.g., .env.shared and .env.secret) and all variables from both
319326
files are accessible.
@@ -327,4 +334,3 @@ def test_run_with_multiple_env_files(tmp_path, files: Sequence[str], file_conten
327334
for key, value in expected.items():
328335
result = invoke_sub([*file_args, "run", "printenv", key])
329336
assert result.stdout.strip() == value
330-

0 commit comments

Comments
 (0)