pytest-regtest 2.3.2__py3-none-any.whl

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.
@@ -0,0 +1,91 @@
1
+ Metadata-Version: 2.3
2
+ Name: pytest-regtest
3
+ Version: 2.3.2
4
+ Summary: pytest plugin for snapshot regression testing
5
+ Project-URL: Source, https://gitlab.com/uweschmitt/pytest-regtest
6
+ Project-URL: Documentation, https://pytest-regtest.readthedocs.org
7
+ Author-email: Uwe Schmitt <uwe.schmitt@id.ethz.ch>
8
+ License: MIT License
9
+ License-File: LICENSE.txt
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Programming Language :: Python :: 3.9
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Requires-Dist: pytest>7.2
17
+ Description-Content-Type: text/markdown
18
+
19
+ ![](https://gitlab.com/uweschmitt/pytest-regtest/badges/main/pipeline.svg)
20
+ ![](https://gitlab.com/uweschmitt/pytest-regtest/badges/main/coverage.svg?job=coverage)
21
+
22
+
23
+ The full documentation for this package are available at
24
+ https://pytest-regtest.readthedocs.org
25
+
26
+ # About
27
+
28
+ ## Introduction
29
+
30
+ `pytest-regtest` is a plugin for [pytest](https://pytest.org) to implement
31
+ **regression testing**.
32
+
33
+ Unlike [functional testing](https://en.wikipedia.org/wiki/Functional_testing),
34
+ [regression testing](https://en.wikipedia.org/wiki/Regression_testing)
35
+ does not test whether the software produces the correct
36
+ results, but whether it behaves as it did before changes were introduced.
37
+
38
+ More specifically, `pytest-regtest` provides **snapshot testing**, which
39
+ implements regression testing by recording data within a test function
40
+ and comparing this recorded output to a previously recorded reference
41
+ output.
42
+
43
+
44
+ ## Installation
45
+
46
+ To install and activate this plugin execute:
47
+
48
+ $ pip install pytest-regtest
49
+
50
+
51
+ !!! note
52
+
53
+ `pytest-regtest` provides some functionality specific to `NumPy`,
54
+ `pandas`, and `polars`. These dependencies are not installed when
55
+ you install `pytest-regtest`. For example, if you are using NumPy
56
+ snapshots, we assume that your production code (the code under
57
+ test) uses NumPy and therefore should be part of your project's
58
+ setup.
59
+
60
+
61
+ ## Use case 1: Changing code with no or little testing setup yet
62
+ If you're working with code that has little or no unit testing, you
63
+ can use regression testing to ensure that your changes don't break or
64
+ alter previous results.
65
+
66
+ **Example**:
67
+ This can be useful when working with data analysis scripts, which often
68
+ start as one long script and then are restructured into different
69
+ functions as they evolve.
70
+
71
+
72
+ ## Use case 2: Testing complex data
73
+ If a unit tests contains many `assert` statements to check a complex
74
+ data structure you can use regression tests instead.
75
+
76
+ **Example**: To test code which ingests data into a database one can
77
+ use regression tests on textual database dumps.
78
+
79
+ ## Use case 3: Testing NumPy arrays or pandas data frames
80
+
81
+ If your code generates numerical results, such as `NumPy` arrays,
82
+ `pandas` or `polars` data frames, you can use `pytest-regtest` to simply record such
83
+ results and test them later, taking into account relative and absolute
84
+ tolerances.
85
+
86
+
87
+ **Example**:
88
+ A function creates a 10 x 10 matrix. Either you have to write 100
89
+ assert statements or you use summary statistics to test your result.
90
+ In both cases, you may get little debugging information if a test
91
+ fails.
@@ -0,0 +1,5 @@
1
+ pytest_regtest-2.3.2.dist-info/METADATA,sha256=g-6og_8Il3fBjTHYBRA1eGHHQ-FMIWU1Nd37oJgUBys,3275
2
+ pytest_regtest-2.3.2.dist-info/WHEEL,sha256=fl6v0VwpzfGBVsGtkAkhILUlJxROXbA3HvRL6Fe3140,105
3
+ pytest_regtest-2.3.2.dist-info/entry_points.txt,sha256=4VuIhXeMGhDo0ATbaUfyjND0atofmZjV_P-o6_uEk2s,36
4
+ pytest_regtest-2.3.2.dist-info/licenses/LICENSE.txt,sha256=Tue36uAzpW79-9WAqzkwPhsDDVd1X-VWUmdZ0MfGYvk,1068
5
+ pytest_regtest-2.3.2.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.25.0
3
+ Root-Is-Purelib: true
4
+ Tag: py2-none-any
5
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [pytest11]
2
+ regtest = pytest_regtest
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2016 Uwe Schmitt
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.