Fix flake8 errors

This commit is contained in:
Raymond Sun
2021-06-14 15:57:50 +10:00
parent c9aefa4a26
commit 6a9cc9e5ea
2 changed files with 13 additions and 2 deletions

View File

@@ -123,6 +123,7 @@ def test_quickstart_defaults(tempdir):
assert (tempdir / 'Makefile').isfile()
assert (tempdir / 'make.bat').isfile()
def test_quickstart_all_answers(tempdir):
answers = {
'Root path': tempdir,
@@ -251,12 +252,13 @@ def test_extensions(tempdir):
exec(conffile.read_text(), ns)
assert ns['extensions'] == ['foo', 'bar', 'baz']
def test_exits_upon_existing_confpy(monkeypatch):
# The code detects existing conf.py with isfile() so we mock it
def mock_isfile(path):
return True
monkeypatch.setattr(path, 'isfile', mock_isfile)
qs.term_input = mock_input({})
d = {}
with pytest.raises(SystemExit):