(cli, dotenv_file, format: Optional[str], content: str, expected: str)
| 24 | ) |
| 25 | ) |
| 26 | def 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 | |
| 39 | def test_list_non_existent_file(cli): |
nothing calls this directly
no outgoing calls
no test coverage detected