-
Notifications
You must be signed in to change notification settings - Fork 29
/
NEWS
423 lines (285 loc) · 10.8 KB
/
NEWS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
----------------------
fixtures release notes
----------------------
NEXT
~~~~
4.1.0
~~~~~
* Drop support for Python 3.6 (EOL)
(Stephen Finucane)
* Drop support for Python 3.7 (EOL)
(Jelmer Vernooij)
* Add a new ``WarningsFilter`` filter, allowing users to filter warnings as
part of their tests, before restoring said filters.
(Stephen Finucane)
4.0.1
~~~~~
* Remove ``testtools`` from ``requirements.txt`` as well.
(Colin Watson)
4.0.0
~~~~~
* Add missing APIs to ``FakeProcess``, making it match ``Popen``.
(Free Ekanayaka, #1373224)
* Dropped support for Python 2.7, Python 3.4 and Python 3.5 (EOL).
(Hugo van Kemenade)
* Added support for Python 3.6-3.10.
(Free Ekanayaka, Stephen Finucane, Colin Watson)
* Add possibility to reset the ``FakeLogger``. (Balazs Gibizer)
* Access ``mock.DEFAULT`` lazily rather than at import time so ``mock`` can
be overridden with something else. (Jelmer Vernooij)
* Support all ``subprocess.Popen`` arguments up to Python 3.10.
(Jürgen Gmach, Colin Watson)
* Move ``testtools`` requirement to a new ``fixtures[streams]`` extra.
(Colin Watson)
3.0.0
~~~~~
* Monkeypatching of callables has been thoroughly overhauled: there were deep
flaws in usability because staticmethod and classmethods are actually
descriptors. (Andrew Laski, Robert Collins)
2.0
~~~
* Monkeypatching of staticmethod's now works correctly on Python 2 and 3.
This is an API break as previously they were bound as instancemethods's
and thus any working patches need to have their first parameter (self)
dropped. (Andrew Laski)
* New class ``CompoundFixture`` added, allowing fixtures to be combined.
(Jonathan Lange)
* Support for Python 3.2 dropped (as pip and setuptools have).
(Robert Collins)
1.4
~~~
* ``fixtures`` now has CI testing via Travis, no more manual work.
(Robert Collins)
* ``mock`` is used in preference to ``unittest.mock`` now, as the rolling
backport has significant bugfixes over older but still supported CPython
stdlib versions. (Robert Collins)
* ``fixtures.FakeLogger`` now detects incorrectly formatted log messages.
(John Villalovos, #1503049)
1.3.1
~~~~~
* ``Fixture.setUp`` now uses a bare except: and will thus catch BaseException.
Any non-Exception-subclass errors are raised verbatim after calling
``cleanUp``, to avoid inappropriate masking in callers. (Robert Collins)
1.3.0
~~~~~
* Add MockPatch, MockPatchMultiple, MockPatchObject - adapters to mock.
(Julien Danjou, Robert Collins)
* Fixture.setUp should no longer be overridden in subclasses. Instead
override _setUp. This permits the Fixture base class to detect failures
during _setUp and trigger any registered cleanups, attach any details
to the failure exception and propagate that to callers. Overriding of
setUp is still supported: this adds a new interface for simpler
implementation of the contract of a fixture.
(Robert Collins, #1456361, #1456353)
1.2.0
~~~~~
* Add warnings module fixture for capturing warnings. (Joshua Harlow)
1.1.0
~~~~~
CHANGES
-------
* FakeLogger now supports a custom formatter. (Sean Dague)
* Fixed test performance on Python 3.5. PEP 475 led to ``time.sleep()`` not
being interrupted when a received signal handler eats the signal (rather
than raising an exception). (Robert Collins)
* ``tox.ini`` added, for folk that use tox. (Sean Dague)
1.0.0
~~~~~
CHANGES
-------
* Fix incorrect entry_point. (Gabi Davar)
0.3.17
~~~~~~
CHANGES
-------
* FakeLogger now supports the ``datefmt`` parameter.
(Sean Dague)
* Fixtures source code is now hosted on
`github <https://github.com/testing-cabal/fixtures>`_.
(Robert Collins)
0.3.16
~~~~~~
CHANGES
-------
* Fixed 0.3.15 on Python 2.6 - version info is a plain tuple there.
(Robert Collins)
0.3.15
~~~~~~
CHANGES
-------
* ``FakePopen`` now supports being called under a context manager (IE: with).
(Steve Kowalik)
* ``FakeProcess`` now supports kill(). (Steve Kowalik)
* ``FakeProcess`` wait() now supports arguments added in Python 3.
(Steve Kowalik)
* ``MonkeyPatch`` now preserves ``staticmethod`` functions.
(Dan Kenigsberg)
0.3.14
~~~~~~
CHANGES
-------
* ``FakePopen`` can now override the returncode attribute.
(Robert Collins)
0.3.13
~~~~~~
CHANGES
-------
* Documentation hopefully covers ``TestWithFixtures`` a little better.
(Robert Collins, #1102688)
* ``FakePopen`` now accepts all the parameters available in Python 2.7.
(Robert Collins)
* ``FakePopen`` now only passes parameters to the get_info routine if the
caller supplied them. (Robert Collins)
* ``setup.py`` now lists the ``testtools`` dependency which was missing.
(Robert Collins, #1103823)
0.3.12
~~~~~~
Brown bag fix up of StringStream from 0.3.11.
0.3.11
~~~~~~
CHANGES
-------
* ``DetailStream`` was ambiguous about whether it handled bytes or characters,
which matters a lot for Python3. It now is deprecated with ByteStream and
StringStream replacing it. (Robert Collins)
* Fixtures is now Python3 compatible. (Robert Collins)
* ``FakeLogger`` has been split out into a ``LogHandler`` fixture that can
inject arbitrary handlers, giving more flexability. (Jonathan Lange)
* pydoc is recommended as a source of info about fixtures.
(Robert Collins, #812845)
* The docs for fixtures have been updated to cover the full API.
(Robert Collins, #1071649)
0.3.10
~~~~~~
New ``DetailStream`` fixture to add file-like object content to testtools
details, cleanup logic factored out into a CallMany class.
CHANGES:
* Add ``join`` method to ``TempDir`` to more readily get paths relative
to a temporary directory. (Jonathan Lange)
* Factor out new ``CallMany`` class to isolate the cleanup logic.
(Robert Collins)
* New ``DetailStream`` fixture to add file-like object content to testtools
details. This allows for easy capture of sys.stdout and sys.stderr for
example. (Clark Boylan)
0.3.9
~~~~~
New ``TempHomeDir`` fixture and more log output included in ``FakeLogger``.
CHANGES:
* New TempHomeDir fixture to create and activate a temporary home directory.
(James Westby)
* ``FakeLogger`` now includes the output from python logging - the .output
attribute as a content object in getDetails, so the logs will automatically
be included in failed test output (or other similar circumstances).
(Francesco Banconi)
0.3.8
~~~~~
Simpler names for a number of fixtures, and two new fixtures NestedTempfile and
Timeout. See the manual for more information.
CHANGES:
* EnvironmentVariable now upcalls via super().
(Jonathan Lange, #881120)
* EnvironmentVariableFixture, LoggerFixture, PopenFixture renamed to
EnvironmentVariable, FakeLogger and FakePopen respectively. All are still
available under their old, deprecated names. (Jonathan Lange, #893539)
* gather_details fixed to handle the case where two child fixtures have the
same detail name. (Jonathan Lange, #895652)
* ``NestedTempfile`` which will change the default path for tempfile temporary
file / directory creation. (Gavin Panella)
* New Timeout fixture. (Martin Pool)
0.3.7
~~~~~
CHANGES:
* New fixture LoggerFixture which replaces a logging module logger.
(Free Ekanayaka)
* On Python 2.7 and above the _fixtures tests are no longer run twice.
(Robert Collins)
* Python 3 now supported. (Jonathan Lange, #816665)
* ``TempDir`` supports creating the temporary directory under a specific path.
An example of where this is useful would be if you have some specific long
lived temporary items and need to avoid running afoul of tmpreaper.
(Robert Collins, #830757)
* Updated to match the changed ``gather_details`` API in testtools. See #801027.
This is an incompatible change in testtools and requires testtools 0.9.12.
(Jonathan Lange)
0.3.6
~~~~~
Another small API break - sorry. Fixture.getDetails no longer returns the
internal details dict (self._details). Access that directly if needed. It now
looks for details in used fixtures and returns those as well as details added
directly.
CHANGES:
* Details from child fixtures for both Fixture and TestWithFixtures no longer
quash same-named details if testtools 0.9.11 is available (for the
gather_details helper).
(Gavin Panella, #796253)
* Fixture.getDetails will now return all the details of fixtures added using
useFixture. (RobertCollins, #780806)
* New fixture ``PackagePathEntry`` which patches the path of an existing
package, allowing importing part of it from another directory.
(Robert Collins)
* New fixture ``PythonPathEntry`` which patches sys.path.
(Robert Collins, #737503)
* Test failure on some setups in
test_cleanUp_raise_first_false_callscleanups_returns_exceptions.
(Gavin Panella, #796249)
* Testtools 0.9.8 is now a minimum requirement.
(Gavin Panella)
0.3.5
~~~~~
CHANGES:
* New fixture ``MonkeyPatch`` which patches (or deletes) an existing attribute
and restores it afterwards. (Robert Collins)
* New fixture ``PythonPackage`` which manages a temporary python package.
(Robert Collins)
* New fixture ``TempDir`` which manages a temporary directory. (Robert Collins)
0.3.4
~~~~~
CHANGES:
* Fixture now supports ``addDetail`` and provides a``getDetails`` call
compatible with the ``testtools.TestCase`` calls. (Robert Collins, #640119)
* New helper ``MethodFixture`` for wrapping an object similarly to
``FunctionFixture`` (Robert Collins)
0.3.3
~~~~~
Fixtures now have a ``useFixture`` method as well, making nesting of fixtures
trivial.
CHANGES:
* New method ``Fixture.useFixture`` allowing fixtures to compose other
fixtures. (Robert Collins)
0.3.2
~~~~~
Point release adding new EnvironmentVariableFixture for controlling environment
variables.
CHANGES:
* New EnvironmentVariableFixture which can set or unset environment variables.
(Robert Collins)
0.3.1
~~~~~
Point release adding experimental PopenFixture.
CHANGES:
* Experimental PopenFixture providing a test double for testing code that runs
external processes. (Robert Collins)
0.3
~~~
This release slightly breaks compatibility in order to get the cleanUp API
really solid : it now will report correctly with testtools 0.9.7, and
generally does the right thing by default. Apologies to anyone affected by
this churn, but I felt the cleanness of the API was worth it.
CHANGES:
* When multiple exceptions are being raised from cleanUp, MultipleExceptions
is used to report them all. This is preferentially imported from testtools
and failing that defined locally. See testtools 0.9.7 for its use.
(Robert Collins)
0.2
~~~
CHANGES:
* Exceptions raised during cleanup are no longer silently swallowed. They
are returned in a list by default, or the first one is raised if raise_first
is supplied. The TestCase glue code passes raise_first to cleanUp.
(Robert Collins, #629032)
0.1
~~~
CHANGES:
* Created project. The primary interfaces are
``fixtures.TestWithFixtures`` and ``fixtures.Fixture``.
Documentation is primarily in README. (Robert Collins)