Skip to content

Commit

Permalink
Merge pull request #64 from penpot/pytest-xdist
Browse files Browse the repository at this point in the history
Use pytest-xdist for parallelized testing
  • Loading branch information
MischaPanch authored Jun 6, 2024
2 parents f5743b6 + e5e2512 commit abb2f65
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 5 deletions.
39 changes: 37 additions & 2 deletions poetry.lock

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

5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ sphinx-togglebutton = "^0.3.2"
sphinx-toolbox = "^3.5.0"
sphinxcontrib-bibtex = "*"
types-requests = "^2.32.0.20240523"
pytest-xdist = "^3.6.1"

[tool.mypy]
allow_redefinition = true
Expand Down Expand Up @@ -181,9 +182,9 @@ move-optionals-to-bottom = true
PYDEVD_DISABLE_FILE_VALIDATION = "1"
# keep relevant parts in sync with pre-commit
[tool.poe.tasks] # https://github.com/nat-n/poethepoet
test = "pytest test --cov=penai --cov-report=xml --cov-report=term-missing --durations=0 -v --color=yes"
test = "pytest test --cov=penai --cov-report=xml --cov-report=term-missing --durations=0 -v --color=yes -n auto"
# Adjust to a smaller set of tests if appropriate
test-subset = "pytest test --color=yes"
test-subset = "pytest test --color=yes -n auto"
_black_check = "black --check src docs"
_ruff_check = "ruff check src docs"
_ruff_check_nb = "nbqa ruff docs"
Expand Down
2 changes: 1 addition & 1 deletion test/penai/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def page_example_svg_path(resources_path: Path) -> Path:
def log_dir() -> Path:
log_dir_root = existing_path("test/log")
session_log_dir = log_dir_root / datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
session_log_dir.mkdir(parents=True)
session_log_dir.mkdir(parents=True, exist_ok=True)
return session_log_dir


Expand Down

0 comments on commit abb2f65

Please sign in to comment.