Compare commits

...

8 Commits

Author SHA1 Message Date
Jürgen Edelbluth 5b4b62139f
Merge branch 'main' of git.codebau.dev:pytest-plugins/pytest-csv-params
Preparing Version 1.0.0 -> Issue #7
2022-08-28 12:37:22 +00:00
Jürgen Edelbluth 5d5441c3ee
Preparing Release 1.0.0 (Issue: #7)
- Latest dependency-update
- Minor documentation tweaks
- Project classifiers mapped to "Production/Stable"
2022-08-28 14:23:28 +02:00
Jürgen Edelbluth 3c0892d8ee
Poetry Preparation shortened for CI
Only dependencies are installed during setup, untracked packages are removed.

Signed-off-by: Jürgen Edelbluth <jed@noreply.git.codebau.dev>
2022-08-26 17:31:50 +02:00
Jürgen Edelbluth 8a55418bb3
E-Mail Notification typo 2022-08-26 12:40:43 +02:00
Jürgen Edelbluth 82584ab395
E-Mail Notification 2022-08-26 12:39:45 +02:00
Jürgen Edelbluth 755d8f9276
Better Tests labeling from Jenkins 2022-08-26 11:55:56 +02:00
Jürgen Edelbluth 725dc359c7
Jenkins CI Setup 2022-08-26 11:50:53 +02:00
Jürgen Edelbluth de8cb8f858
Documentation fixes 2022-08-25 17:16:25 +00:00
9 changed files with 102 additions and 26 deletions

53
.ci/Jenkinsfile vendored Normal file
View File

@ -0,0 +1,53 @@
pipeline {
environment {
TOX_PARALLEL_NO_SPINNER = "1"
PY_COLORS = "0"
}
agent any
stages {
stage('Prepare') {
steps {
sh 'poetry install --remove-untracked --no-root'
}
}
stage('Tox') {
matrix {
axes {
axis {
name 'PYTHON_VERSION'
values 'py38', 'py39', 'py310'
}
}
stages {
stage('Tox Test') {
options {
lock('single-tox-build')
}
steps {
sh 'poetry run tox -r -e ${PYTHON_VERSION}'
xunit checksName: "Tests ${PYTHON_VERSION}", tools: [JUnit(excludesPattern: '', pattern: 'test-reports/*.xml', stopProcessingIfError: true)]
cobertura autoUpdateStability: false, coberturaReportFile: 'coverage.xml', conditionalCoverageTargets: '70, 0, 0', failUnhealthy: false, failUnstable: false, lineCoverageTargets: '80, 0, 0', maxNumberOfBuilds: 0, methodCoverageTargets: '80, 0, 0', onlyStable: false
}
}
}
}
}
}
post {
success {
deleteDir()
}
always {
withCredentials([string(credentialsId: 'jed-notification-email', variable: 'EMAIL')]) {
mail to: "${EMAIL}",
subject: "[${currentBuild.fullDisplayName}] Build #${currentBuild.number}: ${currentBuild.currentResult}",
body: "Duration: ${currentBuild.durationString} / Jenkins URL: ${env.BUILD_URL}"
}
}
}
}

View File

@ -1,13 +1,14 @@
![pytest-csv-params](docs/icon/pytest-csv-params.png)
![pytest-csv-params](https://docs.codebau.dev/pytest-plugins/pytest-csv-params/_images/pytest-csv-params.png)
# pytest-csv-params
A pytest plugin to parametrize data-driven tests by CSV files.
[![PyPI - Downloads](https://img.shields.io/pypi/dw/pytest-csv-params?label=PyPI%20downloads&style=for-the-badge)](https://pypi.org/project/pytest-csv-params/)
[![PyPI - Version](https://img.shields.io/pypi/v/pytest-csv-params?label=PyPI%20version&style=for-the-badge)](https://pypi.org/project/pytest-csv-params/)
[![PyPI - Status](https://img.shields.io/pypi/status/pytest-csv-params?label=PyPI%20status&style=for-the-badge)](https://pypi.org/project/pytest-csv-params/)
[![PyPI - Format](https://img.shields.io/pypi/format/pytest-csv-params?label=PyPI%20format&style=for-the-badge)](https://pypi.org/project/pytest-csv-params/)
[![Build Status](https://build.codebau.dev/buildStatus/icon?job=pytest-csv-params&style=flat)](https://git.codebau.dev/pytest-plugins/pytest-csv-params)
[![PyPI - Downloads](https://img.shields.io/pypi/dw/pytest-csv-params?label=PyPI%20downloads&style=flat&logo=pypi)](https://pypi.org/project/pytest-csv-params/)
[![PyPI - Version](https://img.shields.io/pypi/v/pytest-csv-params?label=PyPI%20version&style=flat&logo=pypi)](https://pypi.org/project/pytest-csv-params/)
[![PyPI - Status](https://img.shields.io/pypi/status/pytest-csv-params?label=PyPI%20status&style=flat&logo=pypi)](https://pypi.org/project/pytest-csv-params/)
[![PyPI - Format](https://img.shields.io/pypi/format/pytest-csv-params?label=PyPI%20format&style=flat&logo=pypi)](https://pypi.org/project/pytest-csv-params/)
## Requirements

View File

@ -93,6 +93,7 @@ html_theme_options = {
"css_minify": True,
"html_minify": True,
"master_doc": True,
"theme_color": "#008080",
}
myst_enable_extensions = [

View File

@ -9,10 +9,11 @@
# Data-driven test parametrization für pytest with CSV files
[![PyPI - Downloads](https://img.shields.io/pypi/dw/pytest-csv-params?label=PyPI%20downloads&style=for-the-badge)](https://pypi.org/project/pytest-csv-params/)
[![PyPI - Version](https://img.shields.io/pypi/v/pytest-csv-params?label=PyPI%20version&style=for-the-badge)](https://pypi.org/project/pytest-csv-params/)
[![PyPI - Status](https://img.shields.io/pypi/status/pytest-csv-params?label=PyPI%20status&style=for-the-badge)](https://pypi.org/project/pytest-csv-params/)
[![PyPI - Format](https://img.shields.io/pypi/format/pytest-csv-params?label=PyPI%20format&style=for-the-badge)](https://pypi.org/project/pytest-csv-params/)
[![Build Status](https://build.codebau.dev/buildStatus/icon?job=pytest-csv-params&style=flat)](https://git.codebau.dev/pytest-plugins/pytest-csv-params)
[![PyPI - Downloads](https://img.shields.io/pypi/dw/pytest-csv-params?label=PyPI%20downloads&style=flat&logo=pypi)](https://pypi.org/project/pytest-csv-params/)
[![PyPI - Version](https://img.shields.io/pypi/v/pytest-csv-params?label=PyPI%20version&style=flat&logo=pypi)](https://pypi.org/project/pytest-csv-params/)
[![PyPI - Status](https://img.shields.io/pypi/status/pytest-csv-params?label=PyPI%20status&style=flat&logo=pypi)](https://pypi.org/project/pytest-csv-params/)
[![PyPI - Format](https://img.shields.io/pypi/format/pytest-csv-params?label=PyPI%20format&style=flat&logo=pypi)](https://pypi.org/project/pytest-csv-params/)
This pytest plugin allows you to parametrize your pytest tests by CSV files. Manage your test data independently of
your tests. This site guides you through [installation](pages/install) and [usage](pages/guide).

View File

@ -1,5 +1,20 @@
# Changelog
## Version 1.0.0
<u>Breaking Changes:</u> ✓ None
<u>Changes:</u>
- Cleanup of codebase for the big step of going to version 1.0
- Project marked as "stable"
- Some minor documentation changes
- Dependencies updated
- Fine-tuning of the tox/test configuration for running on CI
[Downloads](https://git.codebau.dev/pytest-plugins/pytest-csv-params/releases/tag/v1.0.0) |
[Technical Changelog](https://git.codebau.dev/pytest-plugins/pytest-csv-params/compare/v0.4.0...v1.0.0)
## Version 0.4.0
<u>Breaking Changes:</u> ✓ None

View File

@ -93,7 +93,7 @@ and the **documentation**.
### Code
The publishing is done managed with `poetry`. The complete build and deploy configuration takes place in the
The building and deployment is managed by `poetry`. The complete build and deploy configuration takes place in the
`pyproject.toml`. Besides the standard configuration in section `[tool.poetry]`, additional URLs are defined in section
`[tool.poetry.urls]`. As a speciality for this plugin, an entry point is defined in section
`[tool.poetry.plugins."pytest11"]`.

21
poetry.lock generated
View File

@ -8,16 +8,19 @@ python-versions = "*"
[[package]]
name = "astroid"
version = "2.11.7"
version = "2.12.4"
description = "An abstract syntax tree for Python with inference support."
category = "dev"
optional = false
python-versions = ">=3.6.2"
python-versions = ">=3.7.2"
[package.dependencies]
lazy-object-proxy = ">=1.4.0"
typing-extensions = {version = ">=3.10", markers = "python_version < \"3.10\""}
wrapt = ">=1.11,<2"
wrapt = [
{version = ">=1.11,<2", markers = "python_version < \"3.11\""},
{version = ">=1.14,<2", markers = "python_version >= \"3.11\""},
]
[[package]]
name = "atomicwrites"
@ -118,7 +121,7 @@ python-versions = ">=3.6"
[[package]]
name = "charset-normalizer"
version = "2.1.0"
version = "2.1.1"
description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet."
category = "dev"
optional = false
@ -192,7 +195,7 @@ graph = ["objgraph (>=1.7.2)"]
[[package]]
name = "distlib"
version = "0.3.5"
version = "0.3.6"
description = "Distribution utilities"
category = "dev"
optional = false
@ -532,14 +535,14 @@ plugins = ["importlib-metadata"]
[[package]]
name = "pylint"
version = "2.14.5"
version = "2.15.0"
description = "python code static checker"
category = "dev"
optional = false
python-versions = ">=3.7.2"
[package.dependencies]
astroid = ">=2.11.6,<=2.12.0-dev0"
astroid = ">=2.12.4,<=2.14.0-dev0"
colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""}
dill = ">=0.2"
isort = ">=4.2.5,<6"
@ -1051,7 +1054,7 @@ python-versions = ">=3.5"
[[package]]
name = "urllib3"
version = "1.26.11"
version = "1.26.12"
description = "HTTP library with thread-safe connection pooling, file post, and more."
category = "dev"
optional = false
@ -1059,7 +1062,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*,
[package.extras]
brotli = ["brotlicffi (>=0.8.0)", "brotli (>=1.0.9)", "brotlipy (>=0.6.0)"]
secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "ipaddress"]
secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "urllib3-secure-extra", "ipaddress"]
socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"]
[[package]]

View File

@ -1,6 +1,6 @@
[tool.poetry]
name = "pytest-csv-params"
version = "0.4.0"
version = "1.0.0"
description = "Pytest plugin for Test Case Parametrization with CSV files"
authors = ["Juergen Edelbluth <csv_params@jued.de>"]
license = "MIT"
@ -8,11 +8,12 @@ repository = "https://git.codebau.dev/pytest-plugins/pytest-csv-params"
homepage = "https://git.codebau.dev/pytest-plugins/pytest-csv-params"
readme = "README.md"
keywords = [
"py.test", "pytest", "csv", "params", "parametrize", "pytest-plugin",
"py.test", "pytest", "csv", "params", "parametrize", "pytest-plugin", "ddt", "data-driven"
]
classifiers = [
"Development Status :: 4 - Beta",
"Development Status :: 5 - Production/Stable",
"Environment :: Plugins",
"Environment :: Console",
"Framework :: Pytest",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
@ -42,7 +43,7 @@ packages = [
"pytest-csv-params" = "pytest_csv_params.plugin"
[tool.pytest.ini_options]
addopts = "--mypy --black --isort --pylint --pylint-rcfile=.pylintrc --cov --cov-report=term-missing --junitxml=test-reports/pytest_csv_params.xml"
addopts = "--mypy --black --isort --pylint --pylint-rcfile=.pylintrc --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",
@ -108,6 +109,7 @@ legacy_tox_ini = """
[tox]
minversion = 3.25.0
envlist = clean,py38,py39,py310
isolated_build = True
[testenv]
commands =

View File

@ -16,16 +16,16 @@ check_pytest_version()
# Basic config
pytest_configure = _pytest_configure
"""
Hook in our :meth:`_ptcsvp.configure.pytest_configure` method to setup the plugin setup
Hook our :meth:`_ptcsvp.configure.pytest_configure` method to setup the plugin setup
"""
pytest_unconfigure = _pytest_unconfigure
"""
Hook in our :meth:`_ptcsvp.configure.pytest_unconfigure` method to setup the plugin teardown
Hook our :meth:`_ptcsvp.configure.pytest_unconfigure` method to setup the plugin teardown
"""
# Command Line Arguments
pytest_addoption = _pytest_addoption
"""
Hook in our :meth:`_ptcsvp.cmdline.pytest_addoption` method to setup our command line arguments
Hook our :meth:`_ptcsvp.cmdline.pytest_addoption` method to setup our command line arguments
"""