Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def it_prints_location_by_default(show, location):
cli.main(['show'])
expect(show.mock_calls) == [call(location, color='path')]
def it_launches_the_config(launch, config):
cli.main(['edit'])
expect(launch.mock_calls) == [call(config), call().__bool__()]
def it_exits_when_no_config_found(tmpdir):
tmpdir.chdir()
with expect.raises(SystemExit):
cli.main(['edit'])
def it_exits_when_no_config_found(tmpdir):
tmpdir.chdir()
with expect.raises(SystemExit):
cli.main(['show'])
def it_can_print_a_depenendcy_path(show, location):
cli.main(['show', 'bar'])
expect(show.mock_calls) == [call(os.path.join(location, "bar"), color='path')]