Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pytest with randomly via tox #28

Merged
merged 5 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/.tox
__pycache__
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ define runtox
@cd "$(ROOT_DIR)" && tox -e $1
endef

.PHONY: test
test:
@pytest -v `cat testcases/tests|sed 's/^/testcases\//'`
$(call runtox, "pytest")

.PHONY: sanity_test
sanity_test:
@pytest -v testcases/consistency

.PHONY: test sanity_test
$(call runtox, "sanity")

.PHONY: check-mypy
check-mypy:
Expand Down
Empty file added conftest.py
Empty file.
18 changes: 17 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,13 +1,29 @@

[tox]
envlist = flake8, black, mypy, py39, py310, py311
envlist = pytest, sanity, flake8, black, mypy, py39, py310, py311
isolated_build = True

[testenv]
minversion = 3.9
passenv =
TEST_INFO_FILE
deps = pytest
commands = py.test -v .

[testenv:pytest]
deps =
pytest
pyyaml
pytest-randomly
commands = pytest -v testcases/mount testcases/consistency testcases/smbtorture

[testenv:sanity]
deps =
pytest
pyyaml
pytest-randomly
commands = pytest -v testcases/consistency

[testenv:flake8]
deps = flake8
commands = flake8 .
Expand Down