Skip to content

Commit 28d71cb

Browse files
committed
Removed --unattended cmd line option for pytest
1 parent 40f7309 commit 28d71cb

File tree

7 files changed

+11
-16
lines changed

7 files changed

+11
-16
lines changed

.github/workflows/python-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ jobs:
4646
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
4747
- name: Test with pytest
4848
run: |
49-
pytest plotpy --unattended
49+
pytest plotpy

doc/dev/build.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ To run the unittests, you need:
2929

3030
Then run the following command::
3131

32-
pytest -v --unattended plotpy
32+
pytest plotpy
3333

3434
To run test with coverage support, use the following command::
3535

36-
pytest -v --cov --cov-report=html --unattended plotpy
36+
pytest -v --cov --cov-report=html plotpy
3737

3838

3939
Code formatting

doc/dev/contribute.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Before submitting a patch, please check the following points:
7575

7676
.. code-block:: bash
7777
78-
pytest --unattended plotpy
78+
pytest plotpy
7979
8080
Pull request
8181
~~~~~~~~~~~~

doc/dev/platforms.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ That's it, you can now run the tests using the following command:
7272

7373
.. code-block:: bash
7474
75-
pytest --unattended plotpy
75+
pytest plotpy
7676
7777
If you want to rely on Visual Studio Code for editing and take advantage of the
7878
project settings and tasks, you will need to set the following environment variable:
@@ -160,4 +160,4 @@ That's it, you can now run the tests using the following command:
160160

161161
.. code-block:: bash
162162
163-
pytest --unattended plotpy
163+
pytest plotpy

plotpy/tests/conftest.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
# content of conftest.py
22

3+
from guidata.env import execenv
34

4-
def pytest_addoption(parser):
5-
"""Add custom options to the pytest command line."""
6-
parser.addoption(
7-
"--unattended",
8-
action="store_true",
9-
default=None,
10-
help="Unattended mode for gui tests",
11-
)
5+
# Turn on unattended mode for executing tests without user interaction
6+
execenv.unattended = True

scripts/run_coverage.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ call %FUNC% SetPythonPath
1414
call %FUNC% UsePython
1515

1616
set COVERAGE_PROCESS_START=%SCRIPTPATH%\..\.coveragerc
17-
pytest -v --cov --cov-report=html --unattended %MODNAME%
17+
pytest -v --cov --cov-report=html %MODNAME%
1818
start .\htmlcov\index.html
1919
call %FUNC% EndOfScript

scripts/run_pytest.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ for /D %%d in ("%DIR0%*") do (
1919
set WINPYDIRBASE=%%d
2020
call !WINPYDIRBASE!\scripts\env.bat
2121
echo Running pytest from "%%d":
22-
pytest --ff -q --unattended %MODNAME%
22+
pytest --ff -q %MODNAME%
2323
echo ----
2424
)
2525
call %FUNC% EndOfScript

0 commit comments

Comments
 (0)