Skip to content

Commit

Permalink
move tox config to tox.ini (out of pyproject.toml)
Browse files Browse the repository at this point in the history
We would prefer to configure tox using pyproject.toml, but that's
unfortunately not properly supported yet (there's only a hacky way with
a giant string that we were using before). The problem this causes for us
is that other tools (like Renovate bot) don't support the hacky method,
so we're losing out on updates to our tox config.

According to the issue below (and the tox docs), pyproject will be
properly supported by tox v4, so we should check back then to see if we
can get rid of tox.ini.

see: tox-dev/tox#999
see: tox-dev/tox#814
  • Loading branch information
wren committed Nov 5, 2022
1 parent c1eb0c5 commit abff412
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
18 changes: 0 additions & 18 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -160,21 +160,3 @@ flake8-black = ["-BLK901"]
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.tox]
# see: https://tox.wiki/en/latest/example/basic.html
legacy_tox_ini = """
[tox]
envlist = py
isolated_build = True
[testenv]
deps =
pytest >= 6.2
pytest-bdd >=4.0.1,<6.0
pytest-xdist >=2.5.0
toml >=0.10
commands = pytest {posargs}
passenv = HOME
"""
19 changes: 19 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# We would prefer to use pyproject.toml to configure
# tox, but it's not properly supported, yet. Check
# back on this once tox v4 is out.
# see: https://github.com/tox-dev/tox/issues/999
# see: https://github.com/tox-dev/tox/issues/814
# see: https://tox.wiki/en/latest/example/basic.html
[tox]
envlist = py
isolated_build = True

[testenv]
deps =
pytest >= 6.2
pytest-bdd >=4.0.1,<6.0
pytest-xdist >=2.5.0
toml >=0.10

commands = pytest {posargs}
passenv = HOME

0 comments on commit abff412

Please sign in to comment.