| Conditions | 6 |
| Total Lines | 22 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | # pylint: disable=unused-variable,redefined-outer-name,expression-not-assigned |
||
| 11 | @pytest.fixture |
||
| 12 | def config(tmpdir): |
||
| 13 | tmpdir.chdir() |
||
| 14 | path = str(tmpdir.join("gdm.yml")) |
||
| 15 | open(path, 'w').close() |
||
| 16 | return path |
||
| 17 | |||
| 18 | |||
| 19 | def describe_edit(): |
||
| 20 | |||
| 21 | @patch('gitman.system.launch') |
||
| 22 | def it_launches_the_config(launch, config): |
||
| 23 | cli.main(['edit']) |
||
| 24 | |||
| 25 | expect(launch.mock_calls) == [call(config), call().__bool__()] |
||
| 26 | |||
| 27 | def it_exits_when_no_config_found(tmpdir): |
||
| 28 | tmpdir.chdir() |
||
| 29 | |||
| 30 | with expect.raises(SystemExit): |
||
| 31 | cli.main(['edit']) |
||
| 32 |
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.