diff --git a/pytest_pylint/tests/test_pytest_pylint.py b/pytest_pylint/tests/test_pytest_pylint.py index c26af26..4c87ac3 100644 --- a/pytest_pylint/tests/test_pytest_pylint.py +++ b/pytest_pylint/tests/test_pytest_pylint.py @@ -2,7 +2,7 @@ """ Unit testing module for pytest-pylint plugin """ -import os +import pathlib import re from textwrap import dedent from unittest import mock @@ -312,8 +312,8 @@ def test_output_file(testdir): """Verify pylint report output""" testdir.makepyfile("import sys") testdir.runpytest("--pylint", "--pylint-output-file=pylint.report") - output_file = os.path.join(testdir.tmpdir.strpath, "pylint.report") - assert os.path.isfile(output_file) + output_file = pathlib.Path(testdir.tmpdir.strpath) / "pylint.report" + assert output_file.is_file() with open(output_file, "r", encoding="utf-8") as _file: report = _file.read() @@ -339,10 +339,10 @@ def test_output_file(testdir): def test_output_file_makes_dirs(testdir): """Verify output works with folders properly.""" testdir.makepyfile("import sys") - output_path = os.path.join("reports", "pylint.report") + output_path = pathlib.Path("reports", "pylint.report") testdir.runpytest("--pylint", f"--pylint-output-file={output_path}") - output_file = os.path.join(testdir.tmpdir.strpath, output_path) - assert os.path.isfile(output_file) + output_file = pathlib.Path(testdir.tmpdir.strpath) / output_path + assert output_file.is_file() # Run again to make sure we don't crash trying to make a dir that exists testdir.runpytest("--pylint", f"--pylint-output-file={output_path}") diff --git a/setup.py b/setup.py index 1c4d25d..556488a 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ packages=["pytest_pylint"], entry_points={"pytest11": ["pylint = pytest_pylint.plugin"]}, python_requires=">=3.7", - install_requires=["pytest>=7.0", "pylint>=2.13.0", "toml>=0.7.1"], + install_requires=["pytest>=7.0", "pylint>=2.15.0", "toml>=0.7.1"], setup_requires=["pytest-runner"], tests_require=["coverage", "flake8", "black", "isort"], classifiers=[ diff --git a/tox.ini b/tox.ini index fc98e58..b790165 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] envlist = - py3{8, 9, 10}-pylint{213, 30}-pytest{7} - py3{8, 9, 10, 11}-pylint{213, latest, main}-pytest{7, latest, main} + py3{8, 9, 10}-pylint{215, 30}-pytest{7} + py3{8, 9, 10, 11}-pylint{215, latest, main}-pytest{7, latest, main} py3{12}-pylint{latest, main}-pytest{7, latest, main} coverage qa @@ -10,8 +10,7 @@ skip_missing_interpreters = true [testenv] usedevelop = true deps = - pylint213: pylint~=2.13.9 - pylint214: pylint~=2.14.5 + pylint215: pylint~=2.15.10 pylint30: pylint~=3.0 pylintlatest: pylint pylintmain: git+https://github.com/PyCQA/pylint.git@main#egg=pylint