Skip to content

Commit

Permalink
test: add basic tox fixture
Browse files Browse the repository at this point in the history
The newly added test/setup.cfg causes tox to emit a "python" env and
break existing tests. Might as well test against a real fixture.
  • Loading branch information
scop committed May 14, 2019
1 parent 2e1cb45 commit a81a1e8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions test/fixtures/tox/tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[tox]
envlist = py37

[testenv]
deps = pytest
commands = pytest
8 changes: 4 additions & 4 deletions test/t/test_tox.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ class TestTox:
def test_1(self, completion):
assert completion

@pytest.mark.complete("tox -e ")
@pytest.mark.complete("tox -e ", cwd="tox")
def test_2(self, completion):
assert completion == "ALL"
assert all(x in completion for x in "py37 ALL".split())

@pytest.mark.complete("tox -e foo,")
@pytest.mark.complete("tox -e foo,", cwd="tox")
def test_3(self, completion):
assert completion == "foo,ALL"
assert all(x in completion for x in "py37 ALL".split())

0 comments on commit a81a1e8

Please sign in to comment.