Skip to content

Commit d3c053c

Browse files
committed
Fix pytest invocations
1 parent 84211e7 commit d3c053c

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

hatch.toml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# See https://hatch.pypa.io/dev/config/environment/overview/
2+
3+
[envs.doc]
4+
features = ["docs"]
5+
[envs.doc.scripts]
6+
build = "sphinx-build -W -b html doc ./doc/_build/html"
7+
serve = "sphinx-autobuild -W -b html doc --watch ./pymongo --watch ./bson --watch ./gridfs ./doc/_build/serve"
8+
linkcheck = "sphinx-build -E -b linkcheck doc ./doc/_build/linkcheck"
9+
10+
[envs.doctest]
11+
features = ["docs","test"]
12+
[envs.doctest.scripts]
13+
test = "sphinx-build -E -b doctest doc ./doc/_build/doctest"
14+
15+
[envs.typing]
16+
pre-install-commands = [
17+
"pip install -q -r requirements/typing.txt",
18+
]
19+
[envs.typing.scripts]
20+
check-mypy = [
21+
"mypy --install-types --non-interactive bson gridfs tools pymongo",
22+
"mypy --install-types --non-interactive --config-file mypy_test.ini test",
23+
"mypy --install-types --non-interactive test/test_typing.py test/test_typing_strict.py"
24+
]
25+
check-pyright = ["rm -f pyrightconfig.json", "pyright test/test_typing.py test/test_typing_strict.py"]
26+
check-strict-pyright = [
27+
"echo '{{\"strict\": [\"tests/test_typing_strict.py\"]}}' > pyrightconfig.json",
28+
"pyright test/test_typing_strict.py",
29+
"rm -f pyrightconfig.json"
30+
]
31+
check = ["check-mypy", "check-pyright", "check-strict-pyright"]
32+
33+
[envs.test]
34+
features = ["test"]
35+
[envs.test.scripts]
36+
test = "pytest -v --durations=5 --maxfail=10 {args}"
37+
test-eg = "bash ./.evergreen/run-tests.sh {args}"
38+
test-async = "pytest -v --durations=5 --maxfail=10 -m asyncio {args}"
39+
test-mockupdb = ["pip install -U git+https://github.com/mongodb-labs/mongo-mockup-db@master", "test -m mockupdb"]

0 commit comments

Comments
 (0)