Conditions | 7 |
Total Lines | 29 |
Lines | 0 |
Ratio | 0 % |
Changes | 4 | ||
Bugs | 0 | Features | 0 |
1 | # pylint: disable=redefined-outer-name,unused-variable,expression-not-assigned,singleton-comparison |
||
29 | def describe_cli(): |
||
30 | |||
31 | def describe_init(): |
||
32 | |||
33 | def when_config_missing(runner, tmp): |
||
34 | path = tmp.joinpath("env-diff.yml") |
||
35 | with suppress(FileNotFoundError): |
||
36 | path.unlink() |
||
37 | |||
38 | result = runner.invoke(main, ['--init']) |
||
39 | |||
40 | expect(result.output) == ( |
||
41 | "Generated config file: {}\n".format(path) + |
||
42 | "Edit this file to match your application\n" |
||
43 | ) |
||
44 | expect(result.exit_code) == 0 |
||
45 | |||
46 | def describe_run(): |
||
47 | |||
48 | def when_config_missing(runner, tmp): |
||
49 | path = tmp.joinpath("env-diff.yml") |
||
50 | with suppress(FileNotFoundError): |
||
51 | path.unlink() |
||
52 | |||
53 | result = runner.invoke(main, []) |
||
54 | |||
55 | expect(result.output) == \ |
||
56 | "No config file found, generate one with '--init'\n" |
||
57 | expect(result.exit_code) == 1 |
||
58 |