Skip to content

Commit 4e98c17

Browse files
author
Dominik Gresch
committed
Replace single-letter options for first-principles tests.
Replace the single-letter '-V', '-Q' and '-A' options that enable the first-principles tests by '--vasp', '--quantumespresso', and '--abinit'.
1 parent 4eaaf15 commit 4e98c17

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
'tb': ['tbmodels>=1.1.1'],
2626
'doc': ['sphinx', 'sphinx-rtd-theme', 'sphinx-pyreverse', 'pylint==2.4.4'],
2727
'dev': [
28-
'prospector==1.2.0', 'pytest>=5.3', 'pytest-cov', 'yapf==0.29',
28+
'prospector==1.2.0', 'pytest~=6.0', 'pytest-cov', 'yapf==0.29',
2929
'pre-commit', 'pylint==2.4.4'
3030
],
3131
}

tests/conftest.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@
1616

1717

1818
def pytest_addoption(parser): # pylint: disable=missing-function-docstring
19-
parser.addoption('-A', action='store_true', help='run ABINIT tests')
20-
parser.addoption('-V', action='store_true', help='run VASP tests')
19+
parser.addoption('--abinit', action='store_true', help='run ABINIT tests')
20+
parser.addoption('--vasp', action='store_true', help='run VASP tests')
2121
parser.addoption(
22-
'-Q', action='store_true', help='run Quantum ESPRESSO tests'
22+
'--quantumespresso',
23+
action='store_true',
24+
help='run Quantum ESPRESSO tests'
2325
)
2426
parser.addoption(
2527
'--no-plot-compare',
@@ -49,13 +51,13 @@ def pytest_runtest_setup(item): # pylint: disable=missing-function-docstring
4951
vasp_marker = item.get_closest_marker("vasp")
5052
qe_marker = item.get_closest_marker("qe")
5153
if abinit_marker is not None:
52-
if not item.config.getoption("-A"):
54+
if not item.config.getoption("--abinit"):
5355
pytest.skip("test runs only with ABINIT")
5456
if vasp_marker is not None:
55-
if not item.config.getoption("-V"):
57+
if not item.config.getoption("--vasp"):
5658
pytest.skip("test runs only with VASP")
5759
if qe_marker is not None:
58-
if not item.config.getoption("-Q"):
60+
if not item.config.getoption("--quantumespresso"):
5961
pytest.skip("test runs only with Quantum ESPRESSO")
6062

6163

0 commit comments

Comments
 (0)