MCPcopy Create free account
hub / github.com/theskumar/python-dotenv / test_list

Function test_list

tests/test_cli.py:26–36  ·  view source on GitHub ↗
(cli, dotenv_file, format: Optional[str], content: str, expected: str)

Source from the content-addressed store, hash-verified

24 )
25)
26def test_list(cli, dotenv_file, format: Optional[str], content: str, expected: str):
27 with open(dotenv_file, "w") as f:
28 f.write(content + '\n')
29
30 args = ['--file', dotenv_file, 'list']
31 if format is not None:
32 args.extend(['--format', format])
33
34 result = cli.invoke(dotenv_cli, args)
35
36 assert (result.exit_code, result.output) == (0, expected)
37
38
39def test_list_non_existent_file(cli):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected