Skip to content

Commit 7438848

Browse files
committed
Use xdist for faster multi-processing-based tests
1 parent 15c6dac commit 7438848

3 files changed

Lines changed: 30 additions & 2 deletions

File tree

nle/tests/test_db.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ def conn(mockdata):
133133
yield conn
134134

135135

136+
@pytest.mark.usefixtures("mockdata")
136137
class TestDB:
137138
def test_conn(self, conn):
138139
assert conn

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ nle-ttyplay2 = "nle.scripts.ttyplay2:main"
5353
nle-read-tty = "nle.scripts.read_tty:main"
5454

5555
[dependency-groups]
56-
dev = ["nle[dev]"]
56+
dev = ["nle[dev]", "pytest-xdist>=3.8.0"]
5757

5858
[project.optional-dependencies]
5959
agent = ["torch>=1.3.1"]
@@ -115,3 +115,4 @@ before-all = "rm -rf {project}/build {project}/*.so {project}/CMakeCache.txt &&
115115

116116
[tool.pytest.ini_options]
117117
testpaths = ["nle/tests"]
118+
addopts = "-n auto"

uv.lock

Lines changed: 27 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)