Skip to content

Commit

Permalink
Recover the coverage of the server implementation somewhat
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-bach-by committed Nov 14, 2017
1 parent 6fd7706 commit 3e6a976
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_server.py
Expand Up @@ -76,3 +76,11 @@ def test_no_root_pypi_not_cached():

with TestServer() as devpi:
assert 200 == requests.get(devpi.url + '/root/pypi').status_code


def test_log_printed_on_startup_failure(capsys):
with pytest.raises(Exception):
with TestServer(config={'foo': 'bla'}): # use an invalid config to fail the start-up
pass
out, _ = capsys.readouterr()
assert 'unrecognized argument' in out

0 comments on commit 3e6a976

Please sign in to comment.