Skip to content

Commit 8d31d0f

Browse files
authored
Merge pull request #701 from blueyed/fix-tests
tests: skip tests without xdist
2 parents eb9c68f + d0c699d commit 8d31d0f

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
include:
77
- stage: baseline
88
python: 3.6
9-
env: TOXENV=py36-dj20-postgres-coverage
9+
env: TOXENV=py36-dj20-postgres-xdist-coverage
1010
services:
1111
- postgresql
1212
- python: 3.6

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ def read(fname):
4242
'testing': [
4343
'Django',
4444
'django-configurations>=2.0',
45-
'pytest-xdist>=1.15',
4645
'six',
4746
],
4847
},

tests/test_db_setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ def test_a():
115115

116116

117117
def test_xdist_with_reuse(django_testdir):
118+
pytest.importorskip("xdist")
118119
skip_if_sqlite_in_memory()
119120

120121
drop_database("gw0")
@@ -192,6 +193,7 @@ class TestSqliteWithXdist:
192193
}
193194

194195
def test_sqlite_in_memory_used(self, django_testdir):
196+
pytest.importorskip("xdist")
195197

196198
django_testdir.create_test_module(
197199
"""

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ deps =
2626
coverage: coverage-enable-subprocess
2727

2828
pytest41: pytest>=4.1,<4.2
29+
xdist: pytest-xdist>=1.15
2930

3031
setenv =
3132
PYTHONPATH = {toxinidir}:{env:PYTHONPATH:}

0 commit comments

Comments
 (0)