Maintenance 2023-07
- Updated Jenkins pipeline (mainly notification configuration) - Updated pylint configuration (builtins) - Updated pyenv configuration (3.11 is now supported) - Explicit parameter names when registering the plugin - Documentation updated - Code formatting (coding conventions via black and isort) - Version requirements for pytest updated, the tests accordingly - Tested new dependencies
This commit is contained in:
parent
0f3c7b26b3
commit
fcea9e7349
|
@ -18,7 +18,7 @@ pipeline {
|
|||
axes {
|
||||
axis {
|
||||
name 'PYTHON_VERSION'
|
||||
values 'py38', 'py39', 'py310'
|
||||
values 'py38', 'py39', 'py310', 'py311'
|
||||
}
|
||||
}
|
||||
stages {
|
||||
|
|
|
@ -389,8 +389,8 @@ preferred-modules=
|
|||
[EXCEPTIONS]
|
||||
|
||||
# Exceptions that will emit a warning when caught.
|
||||
overgeneral-exceptions=BaseException,
|
||||
Exception
|
||||
overgeneral-exceptions=builtins.BaseException,
|
||||
builtins.Exception
|
||||
|
||||
|
||||
[REFACTORING]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
3.10.6
|
||||
3.9.13
|
||||
3.8.13
|
||||
3.11-dev
|
||||
3.11.4
|
||||
3.10.12
|
||||
3.9.17
|
||||
3.8.17
|
||||
|
|
|
@ -12,8 +12,8 @@ A pytest plugin to parametrize data-driven tests by CSV files.
|
|||
|
||||
## Requirements
|
||||
|
||||
- Python 3.8, 3.9 or 3.10
|
||||
- pytest >= 7.1
|
||||
- Python 3.8, 3.9 or 3.10, 3.11
|
||||
- pytest >= 7.4
|
||||
|
||||
There's no operating system dependent code in this plugin, so it should run anywhere where pytest runs.
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ def pytest_configure(config: Config, plugin_name: str = "csv_params") -> None:
|
|||
:param config: Pytets configuration class
|
||||
:param plugin_name: The name of the pytest plugin, with default value
|
||||
"""
|
||||
config.pluginmanager.register(Plugin(config), f"{plugin_name}_plugin")
|
||||
config.pluginmanager.register(Plugin(config), name=f"{plugin_name}_plugin")
|
||||
|
||||
|
||||
def pytest_unconfigure(config: Config, plugin_name: str = "csv_params") -> None:
|
||||
|
@ -25,4 +25,4 @@ def pytest_unconfigure(config: Config, plugin_name: str = "csv_params") -> None:
|
|||
:param config: Pytest configuration class
|
||||
:param plugin_name: The name of the pytest plgin, with default value
|
||||
"""
|
||||
config.pluginmanager.unregister(f"{plugin_name}_plugin")
|
||||
config.pluginmanager.unregister(name=f"{plugin_name}_plugin")
|
||||
|
|
|
@ -23,11 +23,11 @@ def check_python_version(min_version: Tuple[int, int] = (3, 8)) -> None:
|
|||
raise PythonTooOldError(f"At least Python {'.'.join(map(str, min_version))} required")
|
||||
|
||||
|
||||
def check_pytest_version(min_version: Tuple[int, int] = (7, 1)) -> None:
|
||||
def check_pytest_version(min_version: Tuple[int, int] = (7, 4)) -> None:
|
||||
"""
|
||||
Check if the current version is at least 7.1
|
||||
Check if the current version is at least 7.4
|
||||
|
||||
:param min_version: The minimum version required, as tuple, default is 7.1
|
||||
:param min_version: The minimum version required, as tuple, default is 7.4
|
||||
:raises RuntimeError: When the pytest version is too old/unsupported
|
||||
"""
|
||||
|
||||
|
|
|
@ -1,5 +1,25 @@
|
|||
# Changelog
|
||||
|
||||
## Version 1.1.0
|
||||
|
||||
<u>Special Announcement:</u>
|
||||
|
||||
- This is the last version that supports Python 3.8
|
||||
|
||||
<u>Breaking Changes:</u>
|
||||
|
||||
- Pytest >= 7.4 is required (was >= 7.1 before)
|
||||
|
||||
<u>Changes:</u>
|
||||
|
||||
- Maintenance: Dependency versions
|
||||
- Maintenance: Support for Python 3.11
|
||||
- Maintenance: CI Configuration cleanup
|
||||
- Maintenance: Project Configuration cleanup (supported versions etc.)
|
||||
- Changed Pytest plugin hook
|
||||
- Tests: Changed version interpretation tests, as the standard lib has a better interpretation now
|
||||
- Coding conventions: Black and isort updated, changed things accordingly
|
||||
|
||||
## Version 1.0.0
|
||||
|
||||
<u>Breaking Changes:</u> ✓ None
|
||||
|
|
|
@ -6,7 +6,7 @@ recommended.
|
|||
The minimum requirements are:
|
||||
|
||||
- Python >= 3.8
|
||||
- Pytest >= 7.1
|
||||
- Pytest >= 7.4
|
||||
|
||||
The plugin should run anywhere where these two things can be used.
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@ from os.path import dirname, join
|
|||
from livereload import Server, shell
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
cmd = "make html"
|
||||
if "win32" in sys.platform.lower():
|
||||
cmd = "make.bat html"
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,6 @@
|
|||
[tool.poetry]
|
||||
name = "pytest-csv-params"
|
||||
version = "1.0.2"
|
||||
version = "1.1.0"
|
||||
description = "Pytest plugin for Test Case Parametrization with CSV files"
|
||||
authors = ["Juergen Edelbluth <csv_params@jued.de>"]
|
||||
license = "MIT"
|
||||
|
@ -52,6 +52,7 @@ filterwarnings=[
|
|||
"ignore:Using the __implements__ inheritance pattern for BaseReporter is no longer supported. Child classes should only inherit BaseReporter",
|
||||
"ignore:.*zipimport.*",
|
||||
"ignore:Creating a LegacyVersion has been deprecated and will be removed in the next major release",
|
||||
"ignore:The hookimpl .* uses old-style configuration options.*",
|
||||
]
|
||||
junit_family = "xunit2"
|
||||
junit_logging = "all"
|
||||
|
@ -103,12 +104,13 @@ exclude_lines = [
|
|||
[tool.mypy]
|
||||
python_version = "3.8"
|
||||
strict = true
|
||||
ignore_missing_imports = true
|
||||
|
||||
[tool.tox]
|
||||
legacy_tox_ini = """
|
||||
[tox]
|
||||
minversion = 3.25.0
|
||||
envlist = clean,py38,py39,py310
|
||||
envlist = clean,py38,py39,py310,py311
|
||||
isolated_build = True
|
||||
|
||||
[testenv]
|
||||
|
@ -123,7 +125,7 @@ commands =
|
|||
|
||||
[tool.black]
|
||||
line-length = 120
|
||||
target-version = ['py38', 'py39', 'py310']
|
||||
target-version = ['py38', 'py39', 'py310', 'py311']
|
||||
include = '\.pyi?$'
|
||||
|
||||
[tool.isort]
|
||||
|
@ -133,7 +135,7 @@ multi_line_output = 3
|
|||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.8"
|
||||
pytest = "^7.1.2"
|
||||
pytest = "^7.4.0"
|
||||
|
||||
[tool.poetry.dev-dependencies]
|
||||
tox = "^3.25.1"
|
||||
|
|
|
@ -95,34 +95,39 @@ def test_python_version(
|
|||
@pytest.mark.parametrize(
|
||||
["p_version", "expect_error"],
|
||||
[
|
||||
("7.1", None),
|
||||
("7.1.1", None),
|
||||
("7.1.1.2", None),
|
||||
("7.1.1.2.3", None),
|
||||
("7.1.1.455555", None),
|
||||
("7.1.1.2-145", None),
|
||||
("7.1.1.090909090990", None),
|
||||
("7.2", None),
|
||||
("7.2.5", None),
|
||||
("7.2.5.6", None),
|
||||
("7.2.5.6.3333333", None),
|
||||
("7.2.5.6.333333333.4", None),
|
||||
("7.4", None),
|
||||
("7.4.1", None),
|
||||
("7.4.1.2", None),
|
||||
("7.4.1.2.3", None),
|
||||
("7.4.1.455555", None),
|
||||
("7.4.1.2-145", None),
|
||||
("7.4.1.090909090990", None),
|
||||
("7.5", None),
|
||||
("7.5.5", None),
|
||||
("7.5.5.6", None),
|
||||
("7.5.5.6.3333333", None),
|
||||
("7.5.5.6.333333333.4", None),
|
||||
("8.0", None),
|
||||
("8.0.1", None),
|
||||
("8.0.beta", None),
|
||||
("8.0.beta.3", None),
|
||||
("8.0.2.3", None),
|
||||
("7.0", (RuntimeError, "At least Pytest 7.1 required")),
|
||||
("7.0.1", (RuntimeError, "At least Pytest 7.1 required")),
|
||||
("7.0.111111", (RuntimeError, "At least Pytest 7.1 required")),
|
||||
("7.0.111111.extra", (RuntimeError, "At least Pytest 7.1 required")),
|
||||
("7.0.111111.extra.git-22", (RuntimeError, "At least Pytest 7.1 required")),
|
||||
("7", (RuntimeError, "At least Pytest 7.1 required")),
|
||||
("6", (RuntimeError, "At least Pytest 7.1 required")),
|
||||
("6.1", (RuntimeError, "At least Pytest 7.1 required")),
|
||||
("6.1.2", (RuntimeError, "At least Pytest 7.1 required")),
|
||||
("6.1.2.final", (RuntimeError, "At least Pytest 7.1 required")),
|
||||
("6.1.2.final.3", (RuntimeError, "At least Pytest 7.1 required")),
|
||||
("7.0", (RuntimeError, "At least Pytest 7.4 required")),
|
||||
("7.0.1", (RuntimeError, "At least Pytest 7.4 required")),
|
||||
("7.0.111111", (RuntimeError, "At least Pytest 7.4 required")),
|
||||
("7.1", (RuntimeError, "At least Pytest 7.4 required")),
|
||||
("7.1.1", (RuntimeError, "At least Pytest 7.4 required")),
|
||||
("7.1.111111", (RuntimeError, "At least Pytest 7.4 required")),
|
||||
("7.2", (RuntimeError, "At least Pytest 7.4 required")),
|
||||
("7.2.1", (RuntimeError, "At least Pytest 7.4 required")),
|
||||
("7.2.111111", (RuntimeError, "At least Pytest 7.4 required")),
|
||||
("7.3", (RuntimeError, "At least Pytest 7.4 required")),
|
||||
("7.3.1", (RuntimeError, "At least Pytest 7.4 required")),
|
||||
("7.3.111111", (RuntimeError, "At least Pytest 7.4 required")),
|
||||
("7", (RuntimeError, "At least Pytest 7.4 required")),
|
||||
("6", (RuntimeError, "At least Pytest 7.4 required")),
|
||||
("6.1", (RuntimeError, "At least Pytest 7.4 required")),
|
||||
("6.1.2", (RuntimeError, "At least Pytest 7.4 required")),
|
||||
],
|
||||
)
|
||||
def test_pytest_version(
|
||||
|
|
Loading…
Reference in New Issue