Skip to content

Commit

Permalink
Stop running client tests in parallel with xdist
Browse files Browse the repository at this point in the history
These tests are pretty quick that they don't really benefit from xdist.
Plus not all of our tests are threadsafe (e.g. the ones that call
locale.setlocale()), so if there's no real need for parallelization,
let's skip it.

Refs #1880.
  • Loading branch information
legoktm committed Mar 5, 2024
1 parent b46c725 commit 093ce89
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 40 deletions.
6 changes: 3 additions & 3 deletions client/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ TESTOPTS ?= -v --cov-config .coveragerc --cov-report html --cov-report term-miss
RANDOM_SEED ?= $(shell bash -c 'echo $$RANDOM')

.PHONY: test
test: ## Run the application tests in parallel (for rapid development)
@TEST_CMD="poetry run pytest -v -n 4 --ignore=$(FTESTS) --ignore=$(ITESTS) $(TESTOPTS) $(TESTS)" ; \
test: ## Run the application tests (for rapid development)
@TEST_CMD="poetry run pytest -v --ignore=$(FTESTS) --ignore=$(ITESTS) $(TESTOPTS) $(TESTS)" ; \
source scripts/setup-tmp-directories.sh; \
if command -v xvfb-run > /dev/null; then \
xvfb-run -a $$TEST_CMD ; else \
Expand All @@ -72,7 +72,7 @@ test-random: ## Run the application tests in random order

.PHONY: test-integration
test-integration: ## Run the integration tests
@TEST_CMD="poetry run pytest -v -n 4 $(ITESTS)" ; \
@TEST_CMD="poetry run pytest -v $(ITESTS)" ; \
if command -v xvfb-run > /dev/null; then \
xvfb-run -a $$TEST_CMD ; else \
$$TEST_CMD ; fi
Expand Down
38 changes: 2 additions & 36 deletions client/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion client/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ pytest-mock = "*"
pytest-qt = "^4.2.0"
pytest-random-order = "*"
pytest-vcr = "*"
pytest-xdist = "^3.0.2"
semgrep = "*"
translate-toolkit = "*"
types-polib = "*"
Expand Down

0 comments on commit 093ce89

Please sign in to comment.