You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/changelog.md
+32-18Lines changed: 32 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,22 @@
1
1
# Changelog
2
2
3
+
### 1.6.2 - bug fixes
4
+
5
+
`fixture_union`:
6
+
7
+
* Changed the repr of `NOT_USED` to `pytest_cases.NOT_USED`.
8
+
9
+
*`@pytest_fixture_plus` now correctly handles the `NOT_USED` when fixtures in the union do not contain any parameter. Fixes [#38](https://github.com/smarie/python-pytest-cases/issues/38).
10
+
11
+
`param_fixtures`:
12
+
13
+
*`param_fixtures` now delegates to `param_fixture` when a single parameter name is provided. This is more consistent. Fixed [#36](https://github.com/smarie/python-pytest-cases/issues/36).
14
+
15
+
*`param_fixture[s]` now support all arguments from `fixture` (`scope` and `autouse` in particular).
16
+
3
17
### 1.6.1 - `@pytest_fixture_plus` improvement to handle `NOT_USED` cases
4
18
5
-
Fixed issue where fixtures get called with `NOT_USED` as a parameter when using a `fixture_union`. This issue is actually only fixed in `@pytest_fixture_plus`, if you use `@pytest.fixture` you have to handle it manually. Fixes [#37](https://github.com/smarie/python-pytest-cases/issues/37)
19
+
Fixed issue where fixtures get called with `NOT_USED` as a parameter when using a `fixture_union`. This issue is actually only fixed in `@pytest_fixture_plus`, if you use `@pytest.fixture` you have to handle it manually. Fixes [#37](https://github.com/smarie/python-pytest-cases/issues/37).
6
20
7
21
### 1.6.0 - `fixture_union` and `param_fixture[s]` bugfix
8
22
@@ -18,25 +32,25 @@ Fixed `param_fixtures` issue: all parameter values were identical to the last pa
18
32
19
33
### 1.5.0 - new helpers `param_fixture` and `param_fixtures`
20
34
21
-
Following [Sup3rGeo](https://github.com/Sup3rGeo)'s proposal, introduced two helper methods to create simple "parameter fixtures". Fixes [#31](https://github.com/smarie/python-pytest-cases/issues/31)
35
+
Following [Sup3rGeo](https://github.com/Sup3rGeo)'s proposal, introduced two helper methods to create simple "parameter fixtures". Fixes [#31](https://github.com/smarie/python-pytest-cases/issues/31).
22
36
23
37
### 1.4.2 - parametrized `@pytest_fixture_plus` minor bug fix
24
38
25
-
`@pytest_fixture_plus` now correctly honors parameter id and marks overriden at single parameter level using `pytest.param`. Fixed [#30](https://github.com/smarie/python-pytest-cases/issues/30)
39
+
`@pytest_fixture_plus` now correctly honors parameter id and marks overriden at single parameter level using `pytest.param`. Fixed [#30](https://github.com/smarie/python-pytest-cases/issues/30).
26
40
27
41
### 1.4.1 - parametrized `@pytest_fixture_plus` minor bug fix
28
42
29
43
Fixed `@pytest_fixture_plus` in case it is used with `parametrize` and one parameter is itself customized using `pytest.param`. Fixed [#29](https://github.com/smarie/python-pytest-cases/issues/29).
30
44
31
45
### 1.4.0 - `@pytest_fixture_plus` major improvement
32
46
33
-
* Major improvement of `@pytest_fixture_plus`: instead of generating fixtures, it now correctly parametrizes the fixture. Skip/fail Marks are correctly copied too. Fixes [#28](https://github.com/smarie/python-pytest-cases/issues/28)
47
+
* Major improvement of `@pytest_fixture_plus`: instead of generating fixtures, it now correctly parametrizes the fixture. Skip/fail Marks are correctly copied too. Fixes [#28](https://github.com/smarie/python-pytest-cases/issues/28).
34
48
35
49
*`pytest_fixture_plus` does not accept the `params` and `ids` arguments any more, it only relies on parametrization marks.
Fixed minor bug with parametrized `@pytest_fixture_plus`: spaces are now correctly removed when multiple parameter names are provided in the same `parametrize` call. Fixes [#27](https://github.com/smarie/python-pytest-cases/issues/27)
53
+
Fixed minor bug with parametrized `@pytest_fixture_plus`: spaces are now correctly removed when multiple parameter names are provided in the same `parametrize` call. Fixes [#27](https://github.com/smarie/python-pytest-cases/issues/27).
@@ -48,13 +62,13 @@ Now using `decopatch` to create the decorators.
48
62
49
63
### 1.3.0 - More flexible case generators names + Minor dependency change
50
64
51
-
Cases generators can now support explicit name lists, and name generator callables, in addition to the name template strings. Fixed [#24](https://github.com/smarie/python-pytest-cases/issues/24)
65
+
Cases generators can now support explicit name lists, and name generator callables, in addition to the name template strings. Fixed [#24](https://github.com/smarie/python-pytest-cases/issues/24).
52
66
53
67
Dependency to `decorator` has been dropped and replaced with `makefun`. Fixed [#25](https://github.com/smarie/python-pytest-cases/issues/25).
54
68
55
69
### 1.2.2 - fixed bug with marks on cases with pytest 3.3
56
70
57
-
Marks on cases are now also working with pytest 3.3. Fixed [#23](https://github.com/smarie/python-pytest-cases/issues/23)
71
+
Marks on cases are now also working with pytest 3.3. Fixed [#23](https://github.com/smarie/python-pytest-cases/issues/23).
58
72
59
73
Ids for marked tests are now better managed. A new function `get_pytest_parametrize_args` is now used to transform the list of cases obtained by `get_all_cases(module)`, into the list of marked cases and ids required by `@pytest.mark.parametrize`. The doc has been updated to explain this for advanced users wishing to perform this step manually.
60
74
@@ -64,7 +78,7 @@ Id of test cases with marks was appearing as `ParameterSet`. Fixed it.
64
78
65
79
### 1.2.0 - @pytest.mark can be used on cases + @pytest_fixture_plus parametrization order bugfix
66
80
67
-
Pytest marks such as `@pytest.mark.skipif` can now be used on case functions. As a consequence, `get_all_cases` is now the recommended function to use instead of `extract_cases_from_module` to perform manual collection. Indeed `get_all_cases` correctly prepares the resulting parameters list so that pytest sees the marks. Fixed [#21](https://github.com/smarie/python-pytest-cases/issues/21)
81
+
Pytest marks such as `@pytest.mark.skipif` can now be used on case functions. As a consequence, `get_all_cases` is now the recommended function to use instead of `extract_cases_from_module` to perform manual collection. Indeed `get_all_cases` correctly prepares the resulting parameters list so that pytest sees the marks. Fixed [#21](https://github.com/smarie/python-pytest-cases/issues/21).
68
82
69
83
Fixed parametrization order when `@pytest_fixture_plus` is used with several `@pytest.mark.parametrize`. Fixed [#22](https://github.com/smarie/python-pytest-cases/issues/22).
70
84
@@ -80,15 +94,15 @@ New decorator `@pytest_fixture_plus` allows to use several `@pytest.mark.paramet
80
94
81
95
### 1.0.0 - `@cases_fixture` + pytest 2.x support
82
96
83
-
Pytest 2.x is now supported. Fixes [#14](https://github.com/smarie/python-pytest-cases/issues/14)
97
+
Pytest 2.x is now supported. Fixes [#14](https://github.com/smarie/python-pytest-cases/issues/14).
84
98
85
-
**New feature:**`@cases_fixture` ! Now you can put your cases data retrieval in a fixture so that its duration does not enter into the test duration. This is particularly interesting if you use [pytest-harvest](https://smarie.github.io/python-pytest-harvest/) to create benchmarks: you probably do not want the case data retrieval/parsing to be counted in the test duration, especially if you use caching on the case function to accelerate subsequent retrievals. Fixes [#15](https://github.com/smarie/python-pytest-cases/issues/15)
99
+
**New feature:**`@cases_fixture` ! Now you can put your cases data retrieval in a fixture so that its duration does not enter into the test duration. This is particularly interesting if you use [pytest-harvest](https://smarie.github.io/python-pytest-harvest/) to create benchmarks: you probably do not want the case data retrieval/parsing to be counted in the test duration, especially if you use caching on the case function to accelerate subsequent retrievals. Fixes [#15](https://github.com/smarie/python-pytest-cases/issues/15).
86
100
87
101
### 0.10.1 - minor encoding issue in setup.py
88
102
89
103
### 0.10.0 - support for python 2
90
104
91
-
Python 2 is now supported. Fixed [#3](https://github.com/smarie/python-pytest-cases/issues/3)
105
+
Python 2 is now supported. Fixed [#3](https://github.com/smarie/python-pytest-cases/issues/3).
92
106
93
107
- Note: `CaseData`, `Given`, `ExpectedNormal`, `ExpectedError`, and `MultipleStepsCaseData` type hints is not created in python 2 and python<3.5
94
108
@@ -100,7 +114,7 @@ Python 2 is now supported. Fixed [#3](https://github.com/smarie/python-pytest-ca
100
114
101
115
### 0.8.0 - Filtering can now be done using a callable.
102
116
103
-
*`@cases_data`: the `filter` argument now contains a filtering function. WARNING: the previous behaviour is still available but has been renamed `has_tag`. Fixes [#8](https://github.com/smarie/python-pytest-cases/issues/8)
117
+
*`@cases_data`: the `filter` argument now contains a filtering function. WARNING: the previous behaviour is still available but has been renamed `has_tag`. Fixes [#8](https://github.com/smarie/python-pytest-cases/issues/8).
104
118
105
119
### 0.7.0 - Hardcoded cases selection, and multi-module selection
106
120
@@ -110,31 +124,31 @@ Python 2 is now supported. Fixed [#3](https://github.com/smarie/python-pytest-ca
110
124
111
125
*`get_for` is deprecated: it was too specific to a given case data format.
112
126
*`MultipleStepsCaseData` was fixed to also support multiple inputs.
113
-
* Case functions can now have parameters (even case generators). This is particularly useful for test suites. Fixes [#9](https://github.com/smarie/python-pytest-cases/issues/9)
127
+
* Case functions can now have parameters (even case generators). This is particularly useful for test suites. Fixes [#9](https://github.com/smarie/python-pytest-cases/issues/9).
114
128
115
129
### 0.5.0 - support for test suites
116
130
117
-
* test functions can now be decorated with `@test_steps` to easily define a test suite with several steps. This fixes [#7](https://github.com/smarie/python-pytest-cases/issues/7)
131
+
* test functions can now be decorated with `@test_steps` to easily define a test suite with several steps. This fixes [#7](https://github.com/smarie/python-pytest-cases/issues/7).
118
132
119
133
### 0.4.0 - support for data caching with lru_cache
120
134
121
-
* cases can now be decorated with `@lru_cache`. `@cases_generator` also provides a `lru_cache` parameter to enable caching. Fixes [#6](https://github.com/smarie/python-pytest-cases/issues/6)
135
+
* cases can now be decorated with `@lru_cache`. `@cases_generator` also provides a `lru_cache` parameter to enable caching. Fixes [#6](https://github.com/smarie/python-pytest-cases/issues/6).
122
136
123
137
### 0.3.0 - case generators
124
138
125
-
* New decorator `@cases_generator` to define case generators. Fixes [#1](https://github.com/smarie/python-pytest-cases/issues/1)
139
+
* New decorator `@cases_generator` to define case generators. Fixes [#1](https://github.com/smarie/python-pytest-cases/issues/1).
126
140
* Also, removed unused functions `is_expected_error_instance` and `assert_exception_equal`
* New constant `THIS_MODULE` so that cases and test functions can coexist in the same file. This fixes [#5](https://github.com/smarie/python-pytest-cases/issues/5)
144
+
* New constant `THIS_MODULE` so that cases and test functions can coexist in the same file. This fixes [#5](https://github.com/smarie/python-pytest-cases/issues/5).
131
145
132
146
* Added `@test_target` and `@case_tags` decorators for case functions, and added `filter` parameter in `@cases_data`. This allows users to :
133
147
134
148
* tag a case function with any item (and in particular with the reference to the function it relates to),
135
149
* and to filter the case functions used by a test function according to a particular tag.
136
150
137
-
This fixes [#4](https://github.com/smarie/python-pytest-cases/issues/4)
151
+
This fixes [#4](https://github.com/smarie/python-pytest-cases/issues/4).
0 commit comments