Add new tests-repeat command to Makefile to be able to run unit tests multiple times + in parallel in one shot

This commit is contained in:
lilac-supernova-2 2023-08-26 02:59:40 -04:00 committed by GitHub
parent 988b30845d
commit cb92d6e685
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -12,6 +12,10 @@ dev-setup:
tests:
PYTHONPATH=. pytest graphene_django --cov=graphene_django -vv
.PHONY: tests-repeat ## Run unit tests 100 times to possibly identify flaky unit tests (and run them in parallel)
tests-repeat:
PYTHONPATH=. pytest graphene_django --cov=graphene_django -vv --count 100 -n logical
.PHONY: format ## Format code
format:
black graphene_django examples setup.py

View File

@ -22,6 +22,8 @@ tests_require = [
"pytz",
"django-filter>=22.1",
"pytest-django>=4.5.2",
"pytest-repeat>=0.9.1",
"pytest-xdist>=3.3.1",
] + rest_framework_require