Skip to content

Commit e11c643

Browse files
committed
parallelized pytests
1 parent 0fa906d commit e11c643

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

.github/workflows/test_and_publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ jobs:
6161
pytest ./tests/ --durations=20
6262
env:
6363
LOCAL_PDB_REPO: ./tests/pdb/
64+
SKIP_SPEED_TESTS: True
6465

6566
# - name: Upload coverage to Codecov
6667
# uses: codecov/codecov-action@v3

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,5 @@ norecursedirs = "test-data"
5858

5959
[tool.cibuildwheel]
6060
skip = ["pp*"] # Disable PyPy builds due to Cython
61-
test-requires = "pytest"
62-
test-command = "pytest {project}/tests"
61+
test-requires = ["pytest", "pytest-xdist"]
62+
test-command = "pytest -n auto {project}/tests"

tests/test_atomselect.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,10 @@ def _test_atomselect(pdbid, sel, _pdbmols):
122122

123123
reffile = os.path.join(curr_dir, "test_atomselect", "selections.pickle")
124124
write_reffile = False
125-
time_comp = sys.platform.startswith("linux")
125+
time_comp = (
126+
sys.platform.startswith("linux")
127+
and os.environ.get("SKIP_SPEED_TESTS", None) is None
128+
)
126129
if not write_reffile:
127130
with open(reffile, "rb") as f:
128131
ref = pickle.load(f)

0 commit comments

Comments
 (0)