Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
4d38e26d97 | |||
e75abc95b3 | |||
0fcce8eef9 | |||
4767491b33 | |||
4ec8b0f1ed | |||
68ee89f065 |
4
.ci/Jenkinsfile
vendored
4
.ci/Jenkinsfile
vendored
@ -10,7 +10,7 @@ pipeline {
|
||||
stages {
|
||||
stage('Prepare') {
|
||||
steps {
|
||||
sh 'poetry install --remove-untracked --no-root'
|
||||
sh 'poetry install --sync --no-root'
|
||||
}
|
||||
}
|
||||
stage('Tox') {
|
||||
@ -18,7 +18,7 @@ pipeline {
|
||||
axes {
|
||||
axis {
|
||||
name 'PYTHON_VERSION'
|
||||
values 'py38', 'py39', 'py310', 'py311'
|
||||
values 'py39', 'py310', 'py311'
|
||||
}
|
||||
}
|
||||
stages {
|
||||
|
28
.devcontainer/Dockerfile
Normal file
28
.devcontainer/Dockerfile
Normal file
@ -0,0 +1,28 @@
|
||||
FROM alpine:latest
|
||||
|
||||
LABEL org.opencontainers.image.authors="Juergen Edelbluth <dev@juergen.rocks>"
|
||||
|
||||
RUN apk update && apk upgrade
|
||||
RUN apk add patch build-base gcc zip xz-dev bzip2-dev zlib-dev libffi-dev linux-headers readline-dev openssl-dev openssl sqlite sqlite-dev
|
||||
|
||||
RUN apk add git gpg wget curl bash bash-completion shadow nano starship openssh-client openssh-sftp-server
|
||||
RUN chsh -s /bin/bash
|
||||
|
||||
RUN echo 'eval "$(starship init bash)"' >> ~/.bashrc
|
||||
|
||||
RUN curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | /bin/bash
|
||||
RUN echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
|
||||
RUN echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
|
||||
RUN echo 'eval "$(pyenv init -)"' >> ~/.bashrc
|
||||
|
||||
RUN /bin/bash -c ". ~/.bashrc && pyenv update"
|
||||
|
||||
RUN /bin/bash -c ". ~/.bashrc && pyenv install 3.9"
|
||||
RUN /bin/bash -c ". ~/.bashrc && pyenv install 3.10"
|
||||
RUN /bin/bash -c ". ~/.bashrc && pyenv install 3.11"
|
||||
RUN /bin/bash -c ". ~/.bashrc && pyenv install 3.12"
|
||||
RUN /bin/bash -c ". ~/.bashrc && pyenv install 3.13"
|
||||
|
||||
RUN /bin/bash -c ". ~/.bashrc && pyenv global 3.12"
|
||||
|
||||
RUN /bin/bash -c ". ~/.bashrc && python3 -m pip install pipx && python3 -m pipx ensurepath && pipx install poetry"
|
17
.devcontainer/devcontainer.json
Normal file
17
.devcontainer/devcontainer.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "pytest-csv-params",
|
||||
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"ms-python.python",
|
||||
"ms-python.debugpy",
|
||||
"zeshuaro.vscode-python-poetry",
|
||||
"ms-azuretools.vscode-docker"
|
||||
]
|
||||
}
|
||||
},
|
||||
"build": {
|
||||
"dockerfile": "Dockerfile"
|
||||
}
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
3.11.4
|
||||
3.10.12
|
||||
3.9.17
|
||||
3.8.17
|
||||
3.13.0
|
||||
3.12.7
|
||||
3.11.10
|
||||
3.10.15
|
||||
3.9.20
|
||||
|
@ -12,8 +12,8 @@ A pytest plugin to parametrize data-driven tests by CSV files.
|
||||
|
||||
## Requirements
|
||||
|
||||
- Python 3.8, 3.9, 3.10, 3.11
|
||||
- pytest >= 7.4
|
||||
- Python 3.9, 3.10, 3.11, 3.12, 3.13
|
||||
- pytest >= 8.3
|
||||
|
||||
There's no operating system dependent code in this plugin, so it should run anywhere where pytest runs.
|
||||
|
||||
@ -28,7 +28,7 @@ pip install pytest-csv-params
|
||||
... or poetry ...
|
||||
|
||||
```bash
|
||||
poetry add --dev pytest-csv-params
|
||||
poetry add --group dev pytest-csv-params
|
||||
```
|
||||
|
||||
## Documentation / User Guide
|
||||
|
@ -1,6 +1,7 @@
|
||||
"""
|
||||
Parametrize a test function by CSV file
|
||||
"""
|
||||
|
||||
import csv
|
||||
from pathlib import Path
|
||||
from typing import Any, List, Optional, TypedDict
|
||||
|
@ -4,6 +4,7 @@ the pytest version is recent enough (:meth:`check_pytest_version`).
|
||||
|
||||
During the setup phase of the plugin (see :mod:`pytest_csv_params.plugin`) these methods are called.
|
||||
"""
|
||||
|
||||
import sys
|
||||
from typing import Tuple
|
||||
|
||||
|
@ -1,5 +1,21 @@
|
||||
# Changelog
|
||||
|
||||
## Version 1.2.0
|
||||
|
||||
<u>Breaking Changes:</u>
|
||||
|
||||
- Pytest >= 8.3 is required (was >= 7.4 before)
|
||||
|
||||
<u>Changes:</u>
|
||||
|
||||
- Maintenance: Dependency versions
|
||||
- Maintenance: Support for Python 3.12 and 3.13
|
||||
- Maintenance: CI Configuration cleanup
|
||||
- Maintenance: Code Formatting
|
||||
|
||||
[Downloads](https://git.codebau.dev/pytest-plugins/pytest-csv-params/releases/tag/v1.2.0) |
|
||||
[Technical Changelog](https://git.codebau.dev/pytest-plugins/pytest-csv-params/compare/v1.1.0...v1.2.0)
|
||||
|
||||
## Version 1.1.0
|
||||
|
||||
<u>Special Announcement:</u>
|
||||
@ -20,6 +36,9 @@
|
||||
- Tests: Changed version interpretation tests, as the standard lib has a better interpretation now
|
||||
- Coding conventions: Black and isort updated, changed things accordingly
|
||||
|
||||
[Downloads](https://git.codebau.dev/pytest-plugins/pytest-csv-params/releases/tag/v1.1.0) |
|
||||
[Technical Changelog](https://git.codebau.dev/pytest-plugins/pytest-csv-params/compare/v1.0.0...v1.1.0)
|
||||
|
||||
## Version 1.0.0
|
||||
|
||||
<u>Breaking Changes:</u> ✓ None
|
||||
|
1600
poetry.lock
generated
1600
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "pytest-csv-params"
|
||||
version = "1.1.0"
|
||||
version = "1.2.0"
|
||||
description = "Pytest plugin for Test Case Parametrization with CSV files"
|
||||
authors = ["Juergen Edelbluth <csv_params@jued.de>"]
|
||||
license = "MIT"
|
||||
@ -20,6 +20,9 @@ classifiers = [
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
"Programming Language :: Python :: 3.13",
|
||||
"Topic :: Software Development :: Testing",
|
||||
"Topic :: Software Development :: Quality Assurance",
|
||||
"Operating System :: POSIX",
|
||||
@ -42,17 +45,16 @@ packages = [
|
||||
[tool.poetry.plugins."pytest11"]
|
||||
"pytest-csv-params" = "pytest_csv_params.plugin"
|
||||
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
addopts = "--mypy --black --isort --pylint --pylint-rcfile=.pylintrc --cov --cov-report=term-missing --cov-report=xml --junitxml=test-reports/pytest_csv_params.xml"
|
||||
addopts = "--black --isort --cov --cov-report=term-missing --cov-report=xml --junitxml=test-reports/pytest_csv_params.xml"
|
||||
filterwarnings=[
|
||||
"ignore:.*BlackItem.*:_pytest.warning_types.PytestDeprecationWarning",
|
||||
"ignore:.*BlackItem.*:_pytest.warning_types.PytestRemovedIn8Warning",
|
||||
"ignore:.*PyLintFile.*:_pytest.warning_types.PytestRemovedIn8Warning",
|
||||
"ignore:.*BlackItem.*:_pytest.warning_types.PytestRemovedIn9Warning",
|
||||
"ignore:.*BlackItem.*:_pytest.warning_types.PytestWarning",
|
||||
"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"
|
||||
@ -102,7 +104,7 @@ exclude_lines = [
|
||||
]
|
||||
|
||||
[tool.mypy]
|
||||
python_version = "3.8"
|
||||
python_version = "3.9"
|
||||
strict = true
|
||||
ignore_missing_imports = true
|
||||
|
||||
@ -110,7 +112,7 @@ ignore_missing_imports = true
|
||||
legacy_tox_ini = """
|
||||
[tox]
|
||||
minversion = 3.25.0
|
||||
envlist = clean,py38,py39,py310,py311
|
||||
envlist = clean,py39,py310,py311,py312,py313
|
||||
isolated_build = True
|
||||
|
||||
[testenv]
|
||||
@ -125,7 +127,7 @@ commands =
|
||||
|
||||
[tool.black]
|
||||
line-length = 120
|
||||
target-version = ['py38', 'py39', 'py310', 'py311']
|
||||
target-version = ['py39', 'py310', 'py311', 'py312', 'py313']
|
||||
include = '\.pyi?$'
|
||||
|
||||
[tool.isort]
|
||||
@ -134,20 +136,19 @@ include_trailing_comma = true
|
||||
multi_line_output = 3
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.8"
|
||||
pytest = "^7.4.0"
|
||||
python = "^3.9"
|
||||
pytest = "^8.3.0"
|
||||
attrs = "^24.2.0"
|
||||
|
||||
[tool.poetry.dev-dependencies]
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
tox = "^3.25.1"
|
||||
tox-poetry = "^0.4.1"
|
||||
pytest-black = "^0.3.12"
|
||||
pytest-isort = "^3.0.0"
|
||||
pytest-cov = "^3.0.0"
|
||||
pytest-pylint = "^0.18.0"
|
||||
pytest-cov = "^4.1.0"
|
||||
pytest-mock = "^3.8.2"
|
||||
pytest-clarity = "^1.0.1"
|
||||
pytest-bandit = "^0.6.1"
|
||||
pytest-mypy = "^0.9.1"
|
||||
pytest-order = "^1.0.1"
|
||||
Sphinx = "^5.1.1"
|
||||
myst-parser = "^0.18.0"
|
||||
|
@ -1,6 +1,7 @@
|
||||
"""
|
||||
This module defines/publishes the main decorator.
|
||||
"""
|
||||
|
||||
from _ptcsvp.parametrize import add_parametrization
|
||||
|
||||
csv_params = add_parametrization
|
||||
|
@ -2,6 +2,7 @@
|
||||
Definition of CSV dialects (CSV file formats). At the moment, there is only the default dialect
|
||||
:class:`~pytest_csv_params.dialect.CsvParamsDefaultDialect`.
|
||||
"""
|
||||
|
||||
import csv
|
||||
|
||||
|
||||
|
@ -3,6 +3,7 @@ This module contains type definitions to ease the usage of the API and its docum
|
||||
|
||||
Some types are somewhat complex, and it is easier to use a single word/reference instead of a complex typing construct.
|
||||
"""
|
||||
|
||||
import csv
|
||||
from typing import Any, Callable, Dict, Optional, Type
|
||||
|
||||
|
@ -17,6 +17,7 @@ The CSV file looks like this:
|
||||
|
||||
You find the CSV file in ``tests/assets/blog-example.csv``.
|
||||
"""
|
||||
|
||||
import re
|
||||
from os.path import dirname, join
|
||||
|
||||
|
@ -7,6 +7,7 @@ Example Code for a test case for the documentation site
|
||||
This is the test code for the documentation site's :doc:`User guide </pages/guide>`. It contains everything that's
|
||||
needed to follow the example -- and makes sure the code example is working.
|
||||
"""
|
||||
|
||||
from functools import reduce
|
||||
from os.path import dirname, join
|
||||
from typing import List, Tuple, Union
|
||||
|
Loading…
Reference in New Issue
Block a user