Conditions | 6 |
Total Lines | 22 |
Lines | 0 |
Ratio | 0 % |
1 | # pylint: disable=unused-variable,expression-not-assigned |
||
11 | def describe_gdm(): |
||
12 | |||
13 | @pytest.fixture |
||
14 | def config(tmpdir): |
||
15 | tmpdir.chdir() |
||
16 | path = str(tmpdir.join("gdm.yml")) |
||
17 | open(path, 'w').close() |
||
18 | return path |
||
19 | |||
20 | def describe_edit(): |
||
21 | |||
22 | @patch('gdm.system.launch') |
||
23 | def it_launches_the_config(launch, config): |
||
24 | cli.main(['edit']) |
||
25 | |||
26 | expect(launch.mock_calls) == [call(config), call().__bool__()] |
||
27 | |||
28 | def it_exits_when_no_config_found(tmpdir): |
||
29 | tmpdir.chdir() |
||
30 | |||
31 | with expect.raises(SystemExit): |
||
32 | cli.main(['edit']) |
||
33 |
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.