Skip to content

Commit

Permalink
Dependencies: update requirement pytest~=6.0 and use `pyproject.tom…
Browse files Browse the repository at this point in the history
…l` (#4410)

Starting from v6.0, `pytest` supports using the `pyproject.toml` instead
of a `pytest.ini` to define its configuration. Given that this is
quickly becoming the Python packaging standard and allows us to reduce
the number of configuration files in the top level of the repository, we
increase the version requirement of `pytest`.

Note that we also require `pytest-rerunfailures>=9.1.1` because lower
versions are broken in combination with `pytest==6.1`. See the following:

   pytest-dev/pytest-rerunfailures#128

for details.
  • Loading branch information
sphuber authored Sep 29, 2020
1 parent 9144924 commit af91a8b
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 29 deletions.
28 changes: 23 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
requires = ["setuptools>=40.8.0,<50", "wheel", "reentry~=1.3", "fastentrypoints~=0.12"]
build-backend = "setuptools.build_meta:__legacy__"

[tool.pylint.master]
load-plugins = "pylint_django"

[tool.pylint.format]
max-line-length = 120

[tool.pylint.messages_control]
disable = [
"bad-continuation",
Expand Down Expand Up @@ -39,11 +45,23 @@ good-names = [
"MultiplyAddWorkChain"
]

[tool.pylint.master]
load-plugins = "pylint_django"

[tool.pylint.format]
max-line-length = 120
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "--benchmark-skip"
testpaths = [
"tests",
]
filterwarnings = [
"ignore::DeprecationWarning:babel:",
"ignore::DeprecationWarning:django:",
"ignore::DeprecationWarning:frozendict:",
"ignore::DeprecationWarning:sqlalchemy:",
"ignore::DeprecationWarning:yaml:",
"ignore::DeprecationWarning:pymatgen:",
"ignore::DeprecationWarning:jsonbackend:",
"ignore::DeprecationWarning:reentry:",
"ignore::DeprecationWarning:pkg_resources:",
]

[tool.tox]
legacy_tox_ini = """
Expand Down
13 changes: 0 additions & 13 deletions pytest.ini

This file was deleted.

6 changes: 3 additions & 3 deletions requirements/requirements-py-3.6.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ prompt-toolkit==3.0.4
psutil==5.7.0
psycopg2-binary==2.8.4
ptyprocess==0.6.0
py==1.8.1
py==1.9.0
PyCifRW==4.4.1
pycparser==2.20
pydata-sphinx-theme==0.3.0
Expand All @@ -95,10 +95,10 @@ PyMySQL==0.9.3
PyNaCl==1.3.0
pyparsing==2.4.6
pyrsistent==0.15.7
pytest==5.4.2
pytest==6.0.0
pytest-benchmark==3.2.3
pytest-cov==2.8.1
pytest-rerunfailures==9.0
pytest-rerunfailures==9.1.1
pytest-timeout==1.3.4
python-dateutil==2.8.1
python-editor==1.0.4
Expand Down
6 changes: 3 additions & 3 deletions requirements/requirements-py-3.7.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ prompt-toolkit==3.0.4
psutil==5.7.0
psycopg2-binary==2.8.4
ptyprocess==0.6.0
py==1.8.1
py==1.9.0
PyCifRW==4.4.1
pycparser==2.20
pydata-sphinx-theme==0.3.0
Expand All @@ -94,10 +94,10 @@ PyMySQL==0.9.3
PyNaCl==1.3.0
pyparsing==2.4.6
pyrsistent==0.15.7
pytest==5.4.2
pytest==6.0.0
pytest-benchmark==3.2.3
pytest-cov==2.8.1
pytest-rerunfailures==9.0
pytest-rerunfailures==9.1.1
pytest-timeout==1.3.4
python-dateutil==2.8.1
python-editor==1.0.4
Expand Down
6 changes: 3 additions & 3 deletions requirements/requirements-py-3.8.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ prompt-toolkit==3.0.4
psutil==5.7.0
psycopg2-binary==2.8.4
ptyprocess==0.6.0
py==1.8.1
py==1.9.0
PyCifRW==4.4.1
pycparser==2.20
pydata-sphinx-theme==0.3.0
Expand All @@ -93,10 +93,10 @@ PyMySQL==0.9.3
PyNaCl==1.3.0
pyparsing==2.4.6
pyrsistent==0.15.7
pytest==5.4.2
pytest==6.0.0
pytest-benchmark==3.2.3
pytest-cov==2.8.1
pytest-rerunfailures==9.0
pytest-rerunfailures==9.1.1
pytest-timeout==1.3.4
python-dateutil==2.8.1
python-editor==1.0.4
Expand Down
4 changes: 2 additions & 2 deletions setup.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@
"aiida-export-migration-tests==0.9.0",
"pg8000~=1.13",
"pgtest~=1.3,>=1.3.1",
"pytest~=5.4",
"pytest~=6.0",
"pytest-timeout~=1.3",
"pytest-cov~=2.7",
"pytest-rerunfailures~=9.0",
"pytest-rerunfailures~=9.1,>=9.1.1",
"pytest-benchmark~=3.2",
"coverage<5.0",
"sqlalchemy-diff~=0.1.3"
Expand Down

0 comments on commit af91a8b

Please sign in to comment.