Skip to content

Commit fa74fd0

Browse files
author
Sylvain MARIE
committed
1.6.2 changelog
1 parent f6b121d commit fa74fd0

File tree

1 file changed

+32
-18
lines changed

1 file changed

+32
-18
lines changed

docs/changelog.md

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
11
# Changelog
22

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+
317
### 1.6.1 - `@pytest_fixture_plus` improvement to handle `NOT_USED` cases
418

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).
620

721
### 1.6.0 - `fixture_union` and `param_fixture[s]` bugfix
822

@@ -18,25 +32,25 @@ Fixed `param_fixtures` issue: all parameter values were identical to the last pa
1832

1933
### 1.5.0 - new helpers `param_fixture` and `param_fixtures`
2034

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).
2236

2337
### 1.4.2 - parametrized `@pytest_fixture_plus` minor bug fix
2438

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).
2640

2741
### 1.4.1 - parametrized `@pytest_fixture_plus` minor bug fix
2842

2943
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).
3044

3145
### 1.4.0 - `@pytest_fixture_plus` major improvement
3246

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).
3448

3549
* `pytest_fixture_plus` does not accept the `params` and `ids` arguments any more, it only relies on parametrization marks.
3650

3751
### 1.3.3 - parametrized `@pytest_fixture_plus` Bugfix
3852

39-
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).
4054

4155
### 1.3.2 - parametrized `@pytest_fixture_plus` Bugfix
4256

@@ -48,13 +62,13 @@ Now using `decopatch` to create the decorators.
4862

4963
### 1.3.0 - More flexible case generators names + Minor dependency change
5064

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).
5266

5367
Dependency to `decorator` has been dropped and replaced with `makefun`. Fixed [#25](https://github.com/smarie/python-pytest-cases/issues/25).
5468

5569
### 1.2.2 - fixed bug with marks on cases with pytest 3.3
5670

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).
5872

5973
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.
6074

@@ -64,7 +78,7 @@ Id of test cases with marks was appearing as `ParameterSet`. Fixed it.
6478

6579
### 1.2.0 - @pytest.mark can be used on cases + @pytest_fixture_plus parametrization order bugfix
6680

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).
6882

6983
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).
7084

@@ -80,15 +94,15 @@ New decorator `@pytest_fixture_plus` allows to use several `@pytest.mark.paramet
8094

8195
### 1.0.0 - `@cases_fixture` + pytest 2.x support
8296

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).
8498

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).
86100

87101
### 0.10.1 - minor encoding issue in setup.py
88102

89103
### 0.10.0 - support for python 2
90104

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).
92106

93107
- Note: `CaseData`, `Given`, `ExpectedNormal`, `ExpectedError`, and `MultipleStepsCaseData` type hints is not created in python 2 and python<3.5
94108

@@ -100,7 +114,7 @@ Python 2 is now supported. Fixed [#3](https://github.com/smarie/python-pytest-ca
100114

101115
### 0.8.0 - Filtering can now be done using a callable.
102116

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).
104118

105119
### 0.7.0 - Hardcoded cases selection, and multi-module selection
106120

@@ -110,31 +124,31 @@ Python 2 is now supported. Fixed [#3](https://github.com/smarie/python-pytest-ca
110124

111125
* `get_for` is deprecated: it was too specific to a given case data format.
112126
* `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).
114128

115129
### 0.5.0 - support for test suites
116130

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).
118132

119133
### 0.4.0 - support for data caching with lru_cache
120134

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).
122136

123137
### 0.3.0 - case generators
124138

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).
126140
* Also, removed unused functions `is_expected_error_instance` and `assert_exception_equal`
127141

128142
### 0.2.0 - THIS_MODULE constant + Tagging/Filtering + doc
129143

130-
* 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).
131145

132146
* Added `@test_target` and `@case_tags` decorators for case functions, and added `filter` parameter in `@cases_data`. This allows users to :
133147

134148
* tag a case function with any item (and in particular with the reference to the function it relates to),
135149
* and to filter the case functions used by a test function according to a particular tag.
136150

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).
138152

139153
* Improved documentation
140154

0 commit comments

Comments
 (0)