pytest-csv-params 1.1.0__tar.gz → 1.3.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (19) hide show
  1. {pytest_csv_params-1.1.0 → pytest_csv_params-1.3.2}/PKG-INFO +53 -15
  2. {pytest_csv_params-1.1.0 → pytest_csv_params-1.3.2}/README.md +4 -3
  3. {pytest_csv_params-1.1.0 → pytest_csv_params-1.3.2}/_ptcsvp/parametrize.py +19 -4
  4. {pytest_csv_params-1.1.0 → pytest_csv_params-1.3.2}/_ptcsvp/version.py +1 -0
  5. {pytest_csv_params-1.1.0 → pytest_csv_params-1.3.2}/pyproject.toml +52 -44
  6. {pytest_csv_params-1.1.0 → pytest_csv_params-1.3.2}/pytest_csv_params/decorator.py +1 -0
  7. {pytest_csv_params-1.1.0 → pytest_csv_params-1.3.2}/pytest_csv_params/dialect.py +1 -0
  8. pytest_csv_params-1.3.2/pytest_csv_params/shortcut.py +13 -0
  9. {pytest_csv_params-1.1.0 → pytest_csv_params-1.3.2}/pytest_csv_params/types.py +1 -0
  10. pytest_csv_params-1.3.2/pytest_csv_params/warning.py +20 -0
  11. {pytest_csv_params-1.1.0 → pytest_csv_params-1.3.2}/LICENSE.txt +0 -0
  12. {pytest_csv_params-1.1.0 → pytest_csv_params-1.3.2}/_ptcsvp/__init__.py +0 -0
  13. {pytest_csv_params-1.1.0 → pytest_csv_params-1.3.2}/_ptcsvp/cmdline.py +0 -0
  14. {pytest_csv_params-1.1.0 → pytest_csv_params-1.3.2}/_ptcsvp/configure.py +0 -0
  15. {pytest_csv_params-1.1.0 → pytest_csv_params-1.3.2}/_ptcsvp/plugin.py +0 -0
  16. {pytest_csv_params-1.1.0 → pytest_csv_params-1.3.2}/_ptcsvp/varname.py +0 -0
  17. {pytest_csv_params-1.1.0 → pytest_csv_params-1.3.2}/pytest_csv_params/__init__.py +0 -0
  18. {pytest_csv_params-1.1.0 → pytest_csv_params-1.3.2}/pytest_csv_params/exception.py +0 -0
  19. {pytest_csv_params-1.1.0 → pytest_csv_params-1.3.2}/pytest_csv_params/plugin.py +0 -0
@@ -1,33 +1,70 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: pytest-csv-params
3
- Version: 1.1.0
3
+ Version: 1.3.2
4
4
  Summary: Pytest plugin for Test Case Parametrization with CSV files
5
- Home-page: https://git.codebau.dev/pytest-plugins/pytest-csv-params
6
- License: MIT
5
+ License: Copyright Juergen Edelbluth and other contributors, https://juergen.rocks/
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining
8
+ a copy of this software and associated documentation files (the
9
+ "Software"), to deal in the Software without restriction, including
10
+ without limitation the rights to use, copy, modify, merge, publish,
11
+ distribute, sublicense, and/or sell copies of the Software, and to
12
+ permit persons to whom the Software is furnished to do so, subject to
13
+ the following conditions:
14
+
15
+ The above copyright notice and this permission notice shall be
16
+ included in all copies or substantial portions of the Software.
17
+
18
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
22
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
23
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
24
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
7
25
  Keywords: py.test,pytest,csv,params,parametrize,pytest-plugin,ddt,data-driven
8
26
  Author: Juergen Edelbluth
9
27
  Author-email: csv_params@jued.de
10
- Requires-Python: >=3.8,<4.0
28
+ Requires-Python: >=3.9,<3.14
11
29
  Classifier: Development Status :: 5 - Production/Stable
12
- Classifier: Environment :: Console
13
30
  Classifier: Environment :: Plugins
31
+ Classifier: Environment :: Console
14
32
  Classifier: Framework :: Pytest
15
33
  Classifier: Intended Audience :: Developers
16
34
  Classifier: License :: OSI Approved :: MIT License
17
- Classifier: Operating System :: MacOS :: MacOS X
18
- Classifier: Operating System :: Microsoft :: Windows
19
- Classifier: Operating System :: POSIX
20
- Classifier: Programming Language :: Python :: 3
21
35
  Classifier: Programming Language :: Python :: 3.8
22
36
  Classifier: Programming Language :: Python :: 3.9
23
37
  Classifier: Programming Language :: Python :: 3.10
24
38
  Classifier: Programming Language :: Python :: 3.11
25
- Classifier: Topic :: Software Development :: Quality Assurance
39
+ Classifier: Programming Language :: Python :: 3.12
40
+ Classifier: Programming Language :: Python :: 3.13
26
41
  Classifier: Topic :: Software Development :: Testing
42
+ Classifier: Topic :: Software Development :: Quality Assurance
43
+ Classifier: Operating System :: POSIX
44
+ Classifier: Operating System :: Microsoft :: Windows
45
+ Classifier: Operating System :: MacOS :: MacOS X
27
46
  Classifier: Topic :: Utilities
28
- Requires-Dist: pytest (>=7.4.0,<8.0.0)
47
+ Provides-Extra: dev
48
+ Requires-Dist: Sphinx (>=5.1.1,<6) ; extra == "dev"
49
+ Requires-Dist: attrs (>=24.2)
50
+ Requires-Dist: livereload (>=2.6.3) ; extra == "dev"
51
+ Requires-Dist: myst-parser (>=0.18.0) ; extra == "dev"
52
+ Requires-Dist: pytest (>=8.3,<9)
53
+ Requires-Dist: pytest-bandit (>=0.6.1) ; extra == "dev"
54
+ Requires-Dist: pytest-black (>=0.3.12) ; extra == "dev"
55
+ Requires-Dist: pytest-clarity (>=1.0.1) ; extra == "dev"
56
+ Requires-Dist: pytest-cov (>=4.1) ; extra == "dev"
57
+ Requires-Dist: pytest-isort (>=3.0) ; extra == "dev"
58
+ Requires-Dist: pytest-mock (>=3.8.2) ; extra == "dev"
59
+ Requires-Dist: pytest-order (>=1.0.1,<2) ; extra == "dev"
60
+ Requires-Dist: sphinx-autodoc-typehints (>=1.19.2,<2) ; extra == "dev"
61
+ Requires-Dist: sphinx-material (>=0.0.35) ; extra == "dev"
62
+ Requires-Dist: tomli (>=2.0.1) ; extra == "dev"
63
+ Requires-Dist: tox (>=3.25.1,<4) ; extra == "dev"
64
+ Requires-Dist: tox-poetry (>=0.4.1) ; extra == "dev"
29
65
  Project-URL: Changelog, https://docs.codebau.dev/pytest-plugins/pytest-csv-params/pages/changelog.html
30
66
  Project-URL: Documentation, https://docs.codebau.dev/pytest-plugins/pytest-csv-params/
67
+ Project-URL: Homepage, https://git.codebau.dev/pytest-plugins/pytest-csv-params
31
68
  Project-URL: Issue Tracker, https://git.codebau.dev/pytest-plugins/pytest-csv-params/issues
32
69
  Project-URL: Repository, https://git.codebau.dev/pytest-plugins/pytest-csv-params
33
70
  Project-URL: Releases, https://git.codebau.dev/pytest-plugins/pytest-csv-params/releases
@@ -48,8 +85,8 @@ A pytest plugin to parametrize data-driven tests by CSV files.
48
85
 
49
86
  ## Requirements
50
87
 
51
- - Python 3.8, 3.9, 3.10, 3.11
52
- - pytest >= 7.4
88
+ - Python 3.9, 3.10, 3.11, 3.12, 3.13
89
+ - pytest >= 8.3
53
90
 
54
91
  There's no operating system dependent code in this plugin, so it should run anywhere where pytest runs.
55
92
 
@@ -64,7 +101,7 @@ pip install pytest-csv-params
64
101
  ... or poetry ...
65
102
 
66
103
  ```bash
67
- poetry add --dev pytest-csv-params
104
+ poetry add --group dev pytest-csv-params
68
105
  ```
69
106
 
70
107
  ## Documentation / User Guide
@@ -90,6 +127,7 @@ Simply decorate your test method with `@csv_params` (`pytest_csv_params.decorato
90
127
  | `dialect` | `csv.Dialect` (optional) | CSV Dialect definition (see [Python CSV Documentation](https://docs.python.org/3/library/csv.html#dialects-and-formatting-parameters)) | `csv.excel_tab` |
91
128
  | `data_casts` | `dict` (optional) | Cast Methods for the CSV Data (see "Data Casting" below) | `{ "a": int, "b": float }` |
92
129
  | `header_renames` | `dict` (optional) | Replace headers from the CSV file, so that they can be used as parameters for the test function (since 0.3.0) | `{ "Annual Amount of Bananas": "banana_count", "Cherry export price": "cherry_export_price" }` |
130
+ | `reuse_id_col` | `bool` (optional) | Allows to re-use the ID column as test data column (since 1.3.0), defaults to `False` for backwards compatibility | `True` |
93
131
 
94
132
  ## CSV Format
95
133
 
@@ -12,8 +12,8 @@ A pytest plugin to parametrize data-driven tests by CSV files.
12
12
 
13
13
  ## Requirements
14
14
 
15
- - Python 3.8, 3.9, 3.10, 3.11
16
- - pytest >= 7.4
15
+ - Python 3.9, 3.10, 3.11, 3.12, 3.13
16
+ - pytest >= 8.3
17
17
 
18
18
  There's no operating system dependent code in this plugin, so it should run anywhere where pytest runs.
19
19
 
@@ -28,7 +28,7 @@ pip install pytest-csv-params
28
28
  ... or poetry ...
29
29
 
30
30
  ```bash
31
- poetry add --dev pytest-csv-params
31
+ poetry add --group dev pytest-csv-params
32
32
  ```
33
33
 
34
34
  ## Documentation / User Guide
@@ -54,6 +54,7 @@ Simply decorate your test method with `@csv_params` (`pytest_csv_params.decorato
54
54
  | `dialect` | `csv.Dialect` (optional) | CSV Dialect definition (see [Python CSV Documentation](https://docs.python.org/3/library/csv.html#dialects-and-formatting-parameters)) | `csv.excel_tab` |
55
55
  | `data_casts` | `dict` (optional) | Cast Methods for the CSV Data (see "Data Casting" below) | `{ "a": int, "b": float }` |
56
56
  | `header_renames` | `dict` (optional) | Replace headers from the CSV file, so that they can be used as parameters for the test function (since 0.3.0) | `{ "Annual Amount of Bananas": "banana_count", "Cherry export price": "cherry_export_price" }` |
57
+ | `reuse_id_col` | `bool` (optional) | Allows to re-use the ID column as test data column (since 1.3.0), defaults to `False` for backwards compatibility | `True` |
57
58
 
58
59
  ## CSV Format
59
60
 
@@ -1,9 +1,11 @@
1
1
  """
2
2
  Parametrize a test function by CSV file
3
3
  """
4
+
4
5
  import csv
5
6
  from pathlib import Path
6
7
  from typing import Any, List, Optional, TypedDict
8
+ from warnings import warn
7
9
 
8
10
  import pytest
9
11
  from _pytest.mark import MarkDecorator
@@ -18,6 +20,7 @@ from pytest_csv_params.exception import (
18
20
  CsvParamsDataFileNotFound,
19
21
  )
20
22
  from pytest_csv_params.types import BaseDir, CsvDialect, DataCasts, DataFile, HeaderRenames, IdColName
23
+ from pytest_csv_params.warning import CsvParamsOnlyOneColumnIsUsedAsIdAndDataWarning
21
24
 
22
25
 
23
26
  class TestCaseParameters(TypedDict):
@@ -92,6 +95,7 @@ def add_parametrization( # pylint: disable=too-many-arguments
92
95
  data_casts: DataCasts = None,
93
96
  dialect: CsvDialect = CsvParamsDefaultDialect,
94
97
  header_renames: HeaderRenames = None,
98
+ reuse_id_col: bool = False,
95
99
  ) -> MarkDecorator:
96
100
  """
97
101
  Parametrize a test function with data from a CSV file.
@@ -104,6 +108,7 @@ def add_parametrization( # pylint: disable=too-many-arguments
104
108
  :param data_casts: Methods to cast a column's data into a format that is required for the test
105
109
  :param dialect: The CSV file dialect (CSV file format) to use
106
110
  :param header_renames: A dictonary mapping the header names from the CSV file to usable names for the tests
111
+ :param reuse_id_col: Allows re-using the ID col as test data column; defaults to `False` for backwards compatibility
107
112
 
108
113
  :returns: :meth:`pytest.mark.parametrize` mark decorator, filled with all the data from the CSV.
109
114
  """
@@ -117,11 +122,18 @@ def add_parametrization( # pylint: disable=too-many-arguments
117
122
  if id_col is not None:
118
123
  try:
119
124
  id_index = headers.index(id_col)
120
- del headers[id_index]
125
+ if not reuse_id_col:
126
+ del headers[id_index]
121
127
  except ValueError as err:
122
128
  raise CsvParamsDataFileInvalid(f"Cannot find ID column '{id_col}'") from err
123
- if len(headers) == 0:
124
- raise CsvParamsDataFileInvalid("File seems only to have IDs") from None
129
+ if not reuse_id_col and len(headers) == 0:
130
+ raise CsvParamsDataFileInvalid("File seems only to have IDs") from None
131
+ elif reuse_id_col and len(headers) == 1:
132
+ warn(
133
+ f"it seems you're using only one column of data for this test, "
134
+ f"which is also used as ID column (col: '{id_col}', from file: '{data_file}')",
135
+ CsvParamsOnlyOneColumnIsUsedAsIdAndDataWarning,
136
+ )
125
137
  headers = clean_headers(headers, header_renames)
126
138
  data: List[TestCaseParameters] = []
127
139
  for data_line in csv_lines:
@@ -130,7 +142,10 @@ def add_parametrization( # pylint: disable=too-many-arguments
130
142
  continue
131
143
  test_id = None
132
144
  if id_index >= 0:
133
- test_id = line.pop(id_index)
145
+ if reuse_id_col:
146
+ test_id = line[id_index]
147
+ else:
148
+ test_id = line.pop(id_index)
134
149
  if len(headers) != len(line):
135
150
  raise CsvParamsDataFileInvalid("Header and Data length mismatch") from None
136
151
  if data_casts is not None:
@@ -4,6 +4,7 @@ the pytest version is recent enough (:meth:`check_pytest_version`).
4
4
 
5
5
  During the setup phase of the plugin (see :mod:`pytest_csv_params.plugin`) these methods are called.
6
6
  """
7
+
7
8
  import sys
8
9
  from typing import Tuple
9
10
 
@@ -1,15 +1,12 @@
1
- [tool.poetry]
1
+ [project]
2
2
  name = "pytest-csv-params"
3
- version = "1.1.0"
3
+ version = "1.3.2"
4
4
  description = "Pytest plugin for Test Case Parametrization with CSV files"
5
- authors = ["Juergen Edelbluth <csv_params@jued.de>"]
6
- license = "MIT"
7
- repository = "https://git.codebau.dev/pytest-plugins/pytest-csv-params"
8
- homepage = "https://git.codebau.dev/pytest-plugins/pytest-csv-params"
9
- readme = "README.md"
10
- keywords = [
11
- "py.test", "pytest", "csv", "params", "parametrize", "pytest-plugin", "ddt", "data-driven"
5
+ authors = [
6
+ { name = "Juergen Edelbluth", email = "csv_params@jued.de" },
12
7
  ]
8
+ license = { file = "LICENSE.txt" }
9
+ readme = "README.md"
13
10
  classifiers = [
14
11
  "Development Status :: 5 - Production/Stable",
15
12
  "Environment :: Plugins",
@@ -20,6 +17,9 @@ classifiers = [
20
17
  "Programming Language :: Python :: 3.8",
21
18
  "Programming Language :: Python :: 3.9",
22
19
  "Programming Language :: Python :: 3.10",
20
+ "Programming Language :: Python :: 3.11",
21
+ "Programming Language :: Python :: 3.12",
22
+ "Programming Language :: Python :: 3.13",
23
23
  "Topic :: Software Development :: Testing",
24
24
  "Topic :: Software Development :: Quality Assurance",
25
25
  "Operating System :: POSIX",
@@ -27,32 +27,63 @@ classifiers = [
27
27
  "Operating System :: MacOS :: MacOS X",
28
28
  "Topic :: Utilities",
29
29
  ]
30
- packages = [
31
- { include = "_ptcsvp" },
32
- { include = "pytest_csv_params" },
30
+ keywords = [
31
+ "py.test", "pytest", "csv", "params", "parametrize", "pytest-plugin", "ddt", "data-driven"
32
+ ]
33
+
34
+ requires-python = ">=3.9,<3.14"
35
+
36
+ dependencies = [
37
+ "pytest>=8.3,<9",
38
+ "attrs>=24.2",
39
+ ]
40
+
41
+ [project.optional-dependencies]
42
+ dev = [
43
+ "tox>=3.25.1,<4",
44
+ "tox-poetry>=0.4.1",
45
+ "pytest-black>=0.3.12",
46
+ "pytest-isort>=3.0",
47
+ "pytest-cov>=4.1",
48
+ "pytest-mock>=3.8.2",
49
+ "pytest-clarity>=1.0.1",
50
+ "pytest-bandit>=0.6.1",
51
+ "pytest-order>=1.0.1,<2",
52
+ "Sphinx>=5.1.1,<6",
53
+ "myst-parser>=0.18.0",
54
+ "sphinx-material>=0.0.35",
55
+ "sphinx-autodoc-typehints>=1.19.2,<2",
56
+ "livereload>=2.6.3",
57
+ "tomli>=2.0.1",
33
58
  ]
34
59
 
35
- [tool.poetry.urls]
60
+ [project.urls]
61
+ repository = "https://git.codebau.dev/pytest-plugins/pytest-csv-params"
62
+ homepage = "https://git.codebau.dev/pytest-plugins/pytest-csv-params"
36
63
  "Issue Tracker" = "https://git.codebau.dev/pytest-plugins/pytest-csv-params/issues"
37
64
  "Wiki" = "https://git.codebau.dev/pytest-plugins/pytest-csv-params/wiki"
38
65
  "Releases" = "https://git.codebau.dev/pytest-plugins/pytest-csv-params/releases"
39
66
  "Documentation" = "https://docs.codebau.dev/pytest-plugins/pytest-csv-params/"
40
67
  "Changelog" = "https://docs.codebau.dev/pytest-plugins/pytest-csv-params/pages/changelog.html"
41
68
 
42
- [tool.poetry.plugins."pytest11"]
69
+ [tool.poetry]
70
+ packages = [
71
+ { include = "_ptcsvp" },
72
+ { include = "pytest_csv_params" },
73
+ ]
74
+
75
+ [project.entry-points."pytest11"]
43
76
  "pytest-csv-params" = "pytest_csv_params.plugin"
44
77
 
45
78
  [tool.pytest.ini_options]
46
- addopts = "--mypy --black --isort --pylint --pylint-rcfile=.pylintrc --cov --cov-report=term-missing --cov-report=xml --junitxml=test-reports/pytest_csv_params.xml"
79
+ addopts = "--black --isort --cov --cov-report=term-missing --cov-report=xml --junitxml=test-reports/pytest_csv_params.xml"
47
80
  filterwarnings=[
48
81
  "ignore:.*BlackItem.*:_pytest.warning_types.PytestDeprecationWarning",
49
- "ignore:.*BlackItem.*:_pytest.warning_types.PytestRemovedIn8Warning",
50
- "ignore:.*PyLintFile.*:_pytest.warning_types.PytestRemovedIn8Warning",
82
+ "ignore:.*BlackItem.*:_pytest.warning_types.PytestRemovedIn9Warning",
51
83
  "ignore:.*BlackItem.*:_pytest.warning_types.PytestWarning",
52
84
  "ignore:Using the __implements__ inheritance pattern for BaseReporter is no longer supported. Child classes should only inherit BaseReporter",
53
85
  "ignore:.*zipimport.*",
54
86
  "ignore:Creating a LegacyVersion has been deprecated and will be removed in the next major release",
55
- "ignore:The hookimpl .* uses old-style configuration options.*",
56
87
  ]
57
88
  junit_family = "xunit2"
58
89
  junit_logging = "all"
@@ -102,7 +133,7 @@ exclude_lines = [
102
133
  ]
103
134
 
104
135
  [tool.mypy]
105
- python_version = "3.8"
136
+ python_version = "3.9"
106
137
  strict = true
107
138
  ignore_missing_imports = true
108
139
 
@@ -110,7 +141,7 @@ ignore_missing_imports = true
110
141
  legacy_tox_ini = """
111
142
  [tox]
112
143
  minversion = 3.25.0
113
- envlist = clean,py38,py39,py310,py311
144
+ envlist = clean,py39,py310,py311,py312,py313
114
145
  isolated_build = True
115
146
 
116
147
  [testenv]
@@ -125,7 +156,7 @@ commands =
125
156
 
126
157
  [tool.black]
127
158
  line-length = 120
128
- target-version = ['py38', 'py39', 'py310', 'py311']
159
+ target-version = ['py39', 'py310', 'py311', 'py312', 'py313']
129
160
  include = '\.pyi?$'
130
161
 
131
162
  [tool.isort]
@@ -133,29 +164,6 @@ line_length = 120
133
164
  include_trailing_comma = true
134
165
  multi_line_output = 3
135
166
 
136
- [tool.poetry.dependencies]
137
- python = "^3.8"
138
- pytest = "^7.4.0"
139
-
140
- [tool.poetry.dev-dependencies]
141
- tox = "^3.25.1"
142
- tox-poetry = "^0.4.1"
143
- pytest-black = "^0.3.12"
144
- pytest-isort = "^3.0.0"
145
- pytest-cov = "^3.0.0"
146
- pytest-pylint = "^0.18.0"
147
- pytest-mock = "^3.8.2"
148
- pytest-clarity = "^1.0.1"
149
- pytest-bandit = "^0.6.1"
150
- pytest-mypy = "^0.9.1"
151
- pytest-order = "^1.0.1"
152
- Sphinx = "^5.1.1"
153
- myst-parser = "^0.18.0"
154
- sphinx-material = "^0.0.35"
155
- sphinx-autodoc-typehints = "^1.19.2"
156
- livereload = "^2.6.3"
157
- tomli = "^2.0.1"
158
-
159
167
  [build-system]
160
168
  requires = ["poetry-core>=1.0.0"]
161
169
  build-backend = "poetry.core.masonry.api"
@@ -1,6 +1,7 @@
1
1
  """
2
2
  This module defines/publishes the main decorator.
3
3
  """
4
+
4
5
  from _ptcsvp.parametrize import add_parametrization
5
6
 
6
7
  csv_params = add_parametrization
@@ -2,6 +2,7 @@
2
2
  Definition of CSV dialects (CSV file formats). At the moment, there is only the default dialect
3
3
  :class:`~pytest_csv_params.dialect.CsvParamsDefaultDialect`.
4
4
  """
5
+
5
6
  import csv
6
7
 
7
8
 
@@ -0,0 +1,13 @@
1
+ """
2
+ Shortcut decorators
3
+ """
4
+
5
+ from pytest_csv_params.decorator import csv_params as default_csv_params
6
+
7
+
8
+ def csv_params_reusing_id_col(**kwargs):
9
+ """
10
+ Shortcut decorator that allows to re-use ID columns as data columns
11
+ """
12
+ kwargs.setdefault("reuse_id_col", True)
13
+ return default_csv_params(**kwargs)
@@ -3,6 +3,7 @@ This module contains type definitions to ease the usage of the API and its docum
3
3
 
4
4
  Some types are somewhat complex, and it is easier to use a single word/reference instead of a complex typing construct.
5
5
  """
6
+
6
7
  import csv
7
8
  from typing import Any, Callable, Dict, Optional, Type
8
9
 
@@ -0,0 +1,20 @@
1
+ """
2
+ Definitions of all Warnings used in the Plugin
3
+ """
4
+
5
+ from _pytest.warning_types import PytestWarning
6
+
7
+
8
+ class CsvParamsWarning(PytestWarning):
9
+ """
10
+ Base class for all PytestCsvParams Plugin Warnings
11
+
12
+ Use this class if you want to filter out all the warnings of this Plugin
13
+ """
14
+
15
+
16
+ class CsvParamsOnlyOneColumnIsUsedAsIdAndDataWarning(CsvParamsWarning):
17
+ """
18
+ Raised when only a single column is used for ID and test data, which is
19
+ most likely a configuration error, but might be valid in some scenarios.
20
+ """