Skip to content
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
51 changes: 28 additions & 23 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -151,34 +151,39 @@ unfixable = []
exclude_dirs = ["quickinstall.py", "*/_tests/*", "*/_ui_tests/*"]
skips = ["B101", "B105", "B106", "B307", "B311", "B403", "B608"]

[tool.tox]
legacy_tox_ini = """
# tox configuration - if you change anything here, run this to verify:
# tox --recreate

# run like this:
# tox
# tox -e py39
# tox run -e py39
# tox -- -v -k test_wikiutil
# tox -- -v

[tox]
envlist = py{39,310,311,312},ruff

[testenv]
deps = -rrequirements.d/development.txt
setenv =
# some tests expect a specific order in dicts...
PYTHONHASHSEED = 0
# needed so that lxml can build from source (e.g. on pypy):
CFLAGS = -I/usr/include/libxml2
commands = pytest -rs --pyargs {posargs:moin}

[testenv:ruff]
skip_sdist=true
skip_install=true
changedir =
deps =
ruff
commands = ruff check .
"""
[tool.tox]
requires = ["tox>=4.21"]
envlist = ["3.9", "3.10", "3.11", "3.12", "ruff"]

[tool.tox.env_run_base]
description = "Run tests under {base_python}"
deps = [
"-r requirements.d/development.txt"
]
commands = [
["pytest", "-rs", "--pyargs", { replace="posargs", default=["moin"], extend=true }]
]

[tool.tox.env_run_base.set_env]
# some tests expect a specific order in dicts...
PYTHONHASHSEED = "0"
# needed so that lxml can build from source (e.g. on pypy):
CFLAGS = "-I/usr/include/libxml2"

[tool.tox.env.ruff]
description = "Run the ruff linter on the moin sources"
deps = ["ruff"]
package = "skip"
change_dir = ""
commands = [
["ruff", "check", "."]
]
4 changes: 2 additions & 2 deletions requirements.d/development.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
tox
tox>=4.21.0
psutil
pytest
# we use lxml.etree for xpath-based testing
lxml
# for sitetesting
scrapy>=2.10.1
pre-commit
pre-commit