Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
domdfcoding committed Oct 23, 2024
1 parent d9059f6 commit 85d9837
Show file tree
Hide file tree
Showing 20 changed files with 19 additions and 45 deletions.
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
pytest.param("3.10", marks=only_version("3.10", "Output differs on each version.")),
]
)
def version(request):
def version(request) -> str:
return request.param


Expand All @@ -34,5 +34,5 @@ def version(request):
),
]
)
def os_sep(request):
def os_sep(request) -> str:
return request.param
9 changes: 5 additions & 4 deletions tests/test_tox_raspi_ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,11 @@ def toxinidir(tmp_pathplus: PathPlus) -> PathPlus:
pytest.param(["--raspi-ci", "-e", "mypy"], id="invalid_combo"),
]
)
@pytest.mark.usefixtures("version", "os_sep")
def test_tox_raspi_ci(
capsys,
command: List[str],
toxinidir: PathPlus,
version: str,
os_sep,
advanced_file_regression: AdvancedFileRegressionFixture,
):

Expand All @@ -48,7 +47,8 @@ def test_tox_raspi_ci(
advanced_file_regression.check(prepare_stdout(capout.out, toxinidir))


def test_tox_raspi_ci_no_command(capsys, toxinidir: PathPlus, os_sep, monkeypatch):
@pytest.mark.usefixtures("os_sep")
def test_tox_raspi_ci_no_command(capsys, toxinidir: PathPlus, monkeypatch):
# The output varies depending on the versions of python installed on the host
monkeypatch.setenv("RASPI_CI", '0')

Expand All @@ -61,7 +61,8 @@ def test_tox_raspi_ci_no_command(capsys, toxinidir: PathPlus, os_sep, monkeypatc
assert capout.out


def test_tox_raspi_ci_envvar(capsys, toxinidir: PathPlus, os_sep, monkeypatch):
@pytest.mark.usefixtures("os_sep")
def test_tox_raspi_ci_envvar(capsys, toxinidir: PathPlus, monkeypatch):
# The output varies depending on the versions of python installed on the host

monkeypatch.setenv("RASPI_CI", '1')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
WARNING: Ignoring '--raspi-ci' option as '-e / --envlist' option given.
mypy create: .../.tox/mypy
mypy installed: .../.tox/mypy/lib/python3.10/site-packages/pip/_internal/locations/_distutils.py:9: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives, from distutils.cmd import Command as DistutilsCommand,/usr/lib/python3.10/distutils/command/install.py:13: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead, from distutils.sysconfig import get_config_vars
mypy run-test-pre: PYTHONHASHSEED='2468'
mypy run-test: commands[0] | python -c 'print('"'"'This is the mypy testenv'"'"')'
___________________________________ summary ____________________________________
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
py310 create: .../.tox/py310
py310 installed: .../.tox/py310/lib/python3.10/site-packages/pip/_internal/locations/_distutils.py:9: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives, from distutils.cmd import Command as DistutilsCommand,/usr/lib/python3.10/distutils/command/install.py:13: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead, from distutils.sysconfig import get_config_vars
py310 run-test-pre: PYTHONHASHSEED='1234'
py310 run-test: commands[0] | python --version
mypy create: .../.tox/mypy
mypy installed: .../.tox/mypy/lib/python3.10/site-packages/pip/_internal/locations/_distutils.py:9: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives, from distutils.cmd import Command as DistutilsCommand,/usr/lib/python3.10/distutils/command/install.py:13: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead, from distutils.sysconfig import get_config_vars
mypy run-test-pre: PYTHONHASHSEED='2468'
mypy run-test: commands[0] | python -c 'print('"'"'This is the mypy testenv'"'"')'
___________________________________ summary ____________________________________
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
py310 create: .../.tox/py310
py310 installed: .../.tox/py310/lib/python3.10/site-packages/pip/_internal/locations/_distutils.py:9: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives, from distutils.cmd import Command as DistutilsCommand,/usr/lib/python3.10/distutils/command/install.py:13: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead, from distutils.sysconfig import get_config_vars
py310 run-test-pre: PYTHONHASHSEED='1234'
py310 run-test: commands[0] | python --version
mypy create: .../.tox/mypy
mypy installed: .../.tox/mypy/lib/python3.10/site-packages/pip/_internal/locations/_distutils.py:9: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives, from distutils.cmd import Command as DistutilsCommand,/usr/lib/python3.10/distutils/command/install.py:13: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead, from distutils.sysconfig import get_config_vars
mypy run-test-pre: PYTHONHASHSEED='2468'
mypy run-test: commands[0] | python -c 'print('"'"'This is the mypy testenv'"'"')'
___________________________________ summary ____________________________________
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,12 @@ py39 create: .../.tox/py39
py39 run-test-pre: PYTHONHASHSEED='1234'
py39 run-test: commands[0] | python --version
py310-dev create: .../.tox/py310-dev
py310-dev installed: .../.tox/py310-dev/lib/python3.10/site-packages/pip/_internal/locations/_distutils.py:9: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives, from distutils.cmd import Command as DistutilsCommand,/usr/lib/python3.10/distutils/command/install.py:13: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead, from distutils.sysconfig import get_config_vars
py310-dev run-test-pre: PYTHONHASHSEED='1234'
py310-dev run-test: commands[0] | python --version
mypy create: .../.tox/mypy
mypy installed: .../.tox/mypy/lib/python3.10/site-packages/pip/_internal/locations/_distutils.py:9: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives, from distutils.cmd import Command as DistutilsCommand,/usr/lib/python3.10/distutils/command/install.py:13: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead, from distutils.sysconfig import get_config_vars
mypy run-test-pre: PYTHONHASHSEED='2468'
mypy run-test: commands[0] | python -c 'print('"'"'This is the mypy testenv'"'"')'
build create: .../.tox/build
build installed: .../.tox/build/lib/python3.10/site-packages/pip/_internal/locations/_distutils.py:9: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives, from distutils.cmd import Command as DistutilsCommand,/usr/lib/python3.10/distutils/command/install.py:13: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead, from distutils.sysconfig import get_config_vars
build run-test-pre: PYTHONHASHSEED='5678'
build run-test: commands[0] | python -c 'print('"'"'This is the build testenv'"'"')'
___________________________________ summary ____________________________________
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,12 @@ py39 create: .../.tox/py39
py39 run-test-pre: PYTHONHASHSEED='1234'
py39 run-test: commands[0] | python --version
py310-dev create: .../.tox/py310-dev
py310-dev installed: .../.tox/py310-dev/lib/python3.10/site-packages/pip/_internal/locations/_distutils.py:9: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives, from distutils.cmd import Command as DistutilsCommand,/usr/lib/python3.10/distutils/command/install.py:13: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead, from distutils.sysconfig import get_config_vars
py310-dev run-test-pre: PYTHONHASHSEED='1234'
py310-dev run-test: commands[0] | python --version
mypy create: .../.tox/mypy
mypy installed: .../.tox/mypy/lib/python3.10/site-packages/pip/_internal/locations/_distutils.py:9: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives, from distutils.cmd import Command as DistutilsCommand,/usr/lib/python3.10/distutils/command/install.py:13: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead, from distutils.sysconfig import get_config_vars
mypy run-test-pre: PYTHONHASHSEED='2468'
mypy run-test: commands[0] | python -c 'print('"'"'This is the mypy testenv'"'"')'
build create: .../.tox/build
build installed: .../.tox/build/lib/python3.10/site-packages/pip/_internal/locations/_distutils.py:9: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives, from distutils.cmd import Command as DistutilsCommand,/usr/lib/python3.10/distutils/command/install.py:13: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead, from distutils.sysconfig import get_config_vars
build run-test-pre: PYTHONHASHSEED='5678'
build run-test: commands[0] | python -c 'print('"'"'This is the build testenv'"'"')'
___________________________________ summary ____________________________________
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ py39 create: .../.tox/py39
py39 run-test-pre: PYTHONHASHSEED='1234'
py39 run-test: commands[0] | python --version
py310-dev create: .../.tox/py310-dev
py310-dev installed: .../.tox/py310-dev/lib/python3.10/site-packages/pip/_internal/locations/_distutils.py:9: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives, from distutils.cmd import Command as DistutilsCommand,/usr/lib/python3.10/distutils/command/install.py:13: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead, from distutils.sysconfig import get_config_vars
py310-dev run-test-pre: PYTHONHASHSEED='1234'
py310-dev run-test: commands[0] | python --version
mypy create: .../.tox/mypy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ py39 create: .../.tox/py39
py39 run-test-pre: PYTHONHASHSEED='1234'
py39 run-test: commands[0] | python --version
py310-dev create: .../.tox/py310-dev
py310-dev installed: .../.tox/py310-dev/lib/python3.10/site-packages/pip/_internal/locations/_distutils.py:9: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives, from distutils.cmd import Command as DistutilsCommand,/usr/lib/python3.10/distutils/command/install.py:13: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead, from distutils.sysconfig import get_config_vars
py310-dev run-test-pre: PYTHONHASHSEED='1234'
py310-dev run-test: commands[0] | python --version
mypy create: .../.tox/mypy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ py39 create: .../.tox/py39
py39 run-test-pre: PYTHONHASHSEED='1234'
py39 run-test: commands[0] | python --version
py310-dev create: .../.tox/py310-dev
py310-dev installed: .../.tox/py310-dev/lib/python3.10/site-packages/pip/_internal/locations/_distutils.py:9: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives, from distutils.cmd import Command as DistutilsCommand,/usr/lib/python3.10/distutils/command/install.py:13: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead, from distutils.sysconfig import get_config_vars
py310-dev run-test-pre: PYTHONHASHSEED='1234'
py310-dev run-test: commands[0] | python --version
mypy create: .../.tox/mypy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ py39 create: .../.tox/py39
py39 run-test-pre: PYTHONHASHSEED='1234'
py39 run-test: commands[0] | python --version
py310-dev create: .../.tox/py310-dev
py310-dev installed: .../.tox/py310-dev/lib/python3.10/site-packages/pip/_internal/locations/_distutils.py:9: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives, from distutils.cmd import Command as DistutilsCommand,/usr/lib/python3.10/distutils/command/install.py:13: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead, from distutils.sysconfig import get_config_vars
py310-dev run-test-pre: PYTHONHASHSEED='1234'
py310-dev run-test: commands[0] | python --version
mypy create: .../.tox/mypy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ py39 create: .../.tox/py39
py39 run-test-pre: PYTHONHASHSEED='1234'
py39 run-test: commands[0] | python --version
py310-dev create: .../.tox/py310-dev
py310-dev installed: .../.tox/py310-dev/lib/python3.10/site-packages/pip/_internal/locations/_distutils.py:9: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives, from distutils.cmd import Command as DistutilsCommand,/usr/lib/python3.10/distutils/command/install.py:13: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead, from distutils.sysconfig import get_config_vars
py310-dev run-test-pre: PYTHONHASHSEED='1234'
py310-dev run-test: commands[0] | python --version
mypy create: .../.tox/mypy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ py39 create: .../.tox/py39
py39 run-test-pre: PYTHONHASHSEED='1234'
py39 run-test: commands[0] | python --version
py310-dev create: .../.tox/py310-dev
py310-dev installed: .../.tox/py310-dev/lib/python3.10/site-packages/pip/_internal/locations/_distutils.py:9: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives, from distutils.cmd import Command as DistutilsCommand,/usr/lib/python3.10/distutils/command/install.py:13: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead, from distutils.sysconfig import get_config_vars
py310-dev run-test-pre: PYTHONHASHSEED='1234'
py310-dev run-test: commands[0] | python --version
mypy create: .../.tox/mypy
Expand Down
13 changes: 7 additions & 6 deletions tests/test_tox_raspi_ci_braces.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

# 3rd party
import pytest
import tox # type: ignore
import tox.reporter # type: ignore
import tox # type: ignore[import]
import tox.reporter # type: ignore[import]
from coincidence.regressions import AdvancedFileRegressionFixture
from domdf_python_tools.paths import PathPlus
from testing_tox import prepare_stdout, run_tox
Expand All @@ -32,12 +32,11 @@ def toxinidir(tmp_pathplus: PathPlus) -> PathPlus:
pytest.param(["--raspi-ci", "-e", "mypy"], id="invalid_combo"),
]
)
@pytest.mark.usefixtures("version", "os_sep")
def test_tox_raspi_ci(
capsys,
command: List[str],
toxinidir: PathPlus,
version,
os_sep,
advanced_file_regression: AdvancedFileRegressionFixture,
):
tox.reporter._INSTANCE.tw._file = sys.stdout
Expand All @@ -51,7 +50,8 @@ def test_tox_raspi_ci(
advanced_file_regression.check(prepare_stdout(capout.out, toxinidir))


def test_tox_raspi_ci_no_command(capsys, toxinidir: PathPlus, os_sep):
@pytest.mark.usefixtures("os_sep")
def test_tox_raspi_ci_no_command(capsys, toxinidir: PathPlus):
# The output varies depending on the versions of python installed on the host
tox.reporter._INSTANCE.tw._file = sys.stdout

Expand All @@ -64,7 +64,8 @@ def test_tox_raspi_ci_no_command(capsys, toxinidir: PathPlus, os_sep):
assert capout.out


def test_tox_raspi_ci_envvar(capsys, toxinidir: PathPlus, os_sep, monkeypatch):
@pytest.mark.usefixtures("os_sep")
def test_tox_raspi_ci_envvar(capsys, toxinidir: PathPlus, monkeypatch):
# The output varies depending on the versions of python installed on the host

monkeypatch.setenv("RASPI_CI", '1')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
WARNING: Ignoring '--raspi-ci' option as '-e / --envlist' option given.
mypy create: .../.tox/mypy
mypy installed: .../.tox/mypy/lib/python3.10/site-packages/pip/_internal/locations/_distutils.py:9: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives, from distutils.cmd import Command as DistutilsCommand,/usr/lib/python3.10/distutils/command/install.py:13: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead, from distutils.sysconfig import get_config_vars
mypy run-test-pre: PYTHONHASHSEED='2468'
mypy run-test: commands[0] | python -c 'print('"'"'This is the mypy testenv'"'"')'
___________________________________ summary ____________________________________
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
py310-attrs19.3 create: .../.tox/py310-attrs19.3
py310-attrs19.3 installed: .../.tox/py310-attrs19.3/lib/python3.10/site-packages/pip/_internal/locations/_distutils.py:9: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives, from distutils.cmd import Command as DistutilsCommand,/usr/lib/python3.10/distutils/command/install.py:13: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead, from distutils.sysconfig import get_config_vars
py310-attrs19.3 run-test-pre: PYTHONHASHSEED='1234'
py310-attrs19.3 run-test: commands[0] | python --version
py310-attrs20.2 create: .../.tox/py310-attrs20.2
py310-attrs20.2 installed: .../.tox/py310-attrs20.2/lib/python3.10/site-packages/pip/_internal/locations/_distutils.py:9: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives, from distutils.cmd import Command as DistutilsCommand,/usr/lib/python3.10/distutils/command/install.py:13: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead, from distutils.sysconfig import get_config_vars
py310-attrs20.2 run-test-pre: PYTHONHASHSEED='1234'
py310-attrs20.2 run-test: commands[0] | python --version
mypy create: .../.tox/mypy
mypy installed: .../.tox/mypy/lib/python3.10/site-packages/pip/_internal/locations/_distutils.py:9: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives, from distutils.cmd import Command as DistutilsCommand,/usr/lib/python3.10/distutils/command/install.py:13: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead, from distutils.sysconfig import get_config_vars
mypy run-test-pre: PYTHONHASHSEED='2468'
mypy run-test: commands[0] | python -c 'print('"'"'This is the mypy testenv'"'"')'
___________________________________ summary ____________________________________
Expand Down
Loading

0 comments on commit 85d9837

Please sign in to comment.