File python-pytest.changes of Package python-pytest
xxxxxxxxxx
1
-------------------------------------------------------------------
2
Thu Mar 26 07:29:49 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
3
4
- Skip garbage test https://bugs.python.org/issue23841
5
- Update in SLE bsc#1167732
6
7
-------------------------------------------------------------------
8
Thu Mar 26 06:15:43 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
9
10
- Do pull in properly pytest not pytest3
11
12
-------------------------------------------------------------------
13
Wed Mar 25 16:28:18 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
14
15
- Remove docu part so we don't need to pull the dependencies
16
17
-------------------------------------------------------------------
18
Fri Oct 11 08:11:46 UTC 2019 - Ondřej Súkup <mimi.vx@gmail.com>
19
20
- add attrs.patch - fix compatibility with attrs-19.2+
21
22
-------------------------------------------------------------------
23
Wed Sep 25 09:39:55 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
24
25
- Revert the importlib-metadata.patch change from last
26
change and split it to separate patch adding more content:
27
* importlib-py38.patch
28
* importlib-metadata.patch
29
30
-------------------------------------------------------------------
31
Wed Sep 11 11:19:59 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
32
33
- Update importlib-metadata.patch to not pull in the importlib
34
on python 3.8+
35
36
-------------------------------------------------------------------
37
Tue Jun 11 07:02:25 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
38
39
- Add missing quotes to the test call
40
41
-------------------------------------------------------------------
42
Fri Jun 7 11:42:16 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
43
44
- Add patch to fix build with new sphinx:
45
* sphinx2.0.patch
46
- Add patch to fix build with new pluggy that uses importlib-metadata:
47
* importlib-metadata.patch
48
49
-------------------------------------------------------------------
50
Tue Feb 26 13:05:11 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
51
52
- Add patch to build with new pluggy:
53
* new-pluggy.patch
54
55
-------------------------------------------------------------------
56
Fri Jan 4 22:08:17 CET 2019 - mcepl@suse.com
57
58
- Switch the package to multibuild.
59
- Add fix_test_raises_exception_looks_iterable.patch from
60
gh#pytest-dev/pytest#4525
61
62
-------------------------------------------------------------------
63
Wed Nov 14 14:00:29 UTC 2018 - Ondřej Súkup <mimi.vx@gmail.com>
64
65
- update to 3.10.1
66
* Fix nested usage of debugging plugin (pdb)
67
* Block the stepwise plugin if cacheprovider is also blocked, as one
68
depends on the other.
69
* Parse minversion as an actual version and not as dot-separated strings.
70
* Fix duplicate collection due to multiple args matching the same packages.
71
* Fix item.nodeid with resolved symlinks.
72
* Fix collection of direct symlinked files, where the target does not match
73
python_files.
74
* Fix TypeError in report_collect with _collect_report_last_write.
75
76
-------------------------------------------------------------------
77
Mon Nov 5 08:13:05 UTC 2018 - Ondřej Súkup <mimi.vx@gmail.com>
78
79
- update to 3.10.0
80
* Resume capturing output after continue with __import__("pdb").set_trace().
81
* Add -sw, --stepwise as an alternative to --lf -x for stopping at the first
82
failure, but starting the next test invocation from that test.
83
* Make --color emit colorful dots when not running in verbose mode.
84
* Improve performance with collection reporting in non-quiet mode with terminals.
85
* The "collecting …" message is only printed/updated every 0.5s.
86
* Fix false RemovedInPytest4Warning: usage of Session... is deprecated,
87
please use pytest warnings.
88
* Fix problems with running tests in package __init__.py files.
89
* Swallow warnings during anonymous compilation of source.
90
* Fix access denied error when deleting stale directories
91
created by tmpdir / tmp_path.
92
* Naming a fixture request will now raise a warning: the request fixture
93
is internal and should not be overwritten as it will lead to internal errors.
94
* Handle (ignore) exceptions raised during collection, e.g.
95
with Django's LazySettings proxy class.
96
* Added missing documentation about the fact that module names passed
97
to filter warnings are not regex-escaped.
98
* Display cachedir also in non-verbose mode if non-default.
99
* pdb: improve message about output capturing with set_trace.
100
* Do not display "IO-capturing turned off/on" when -s is used to avoid confusion.
101
* Improve message and stack level of warnings issued by monkeypatch.setenv
102
when the value of the environment variable is not a str.
103
* Fix "ValueError: Plugin already registered" with conftest plugins via symlink.
104
* Handle race condition between creation and deletion of temporary folders.
105
* Fix bug where the warning summary at the end of the test session was
106
not showing the test where the warning was originated.
107
* Fix regression when stacklevel for warnings was passed as positional
108
argument on python2.
109
* Add reference to empty_parameter_set_mark ini option in documentation
110
of @pytest.mark.parametrize
111
* Revert patching of sys.breakpointhook since it appears to do nothing.
112
* Apply an import sorter (reorder-python-imports) to the codebase.
113
* Remove use of unnecessary compat shim, six.binary_type
114
115
-------------------------------------------------------------------
116
Fri Oct 26 10:59:13 UTC 2018 - Ondřej Súkup <mimi.vx@gmail.com>
117
118
- update to 3.9.2
119
* Improve error message when a recursive dependency between fixtures is detected.
120
* Fix logging messages not shown in hooks pytest_sessionstart() and pytest_sessionfinish().
121
* Fix unescaped XML raw objects in JUnit report for skipped tests
122
* Python 2: safely format warning message about passing unicode strings to
123
warnings.warn, which may cause surprising MemoryError exception when monkey
124
patching warnings.warn itself.
125
* Improve error message when it is not possible to determine a function’s signature.
126
* Pin setuptools>=40.0 to support py_modules in setup.cfg
127
* Restore the tmpdir behaviour of symlinking the current test run.
128
* Fix filename reported by warnings.warn when using recwarn under python2.
129
* For test-suites containing test classes, the information about the subclassed
130
module is now output only if a higher verbosity level is specified (at least “-vv”).
131
* The following accesses have been documented as deprecated for years, but are now
132
actually emitting deprecation warnings.
133
* Add a Deprecation warning for pytest.ensuretemp as it was deprecated since a while.
134
* Improve usage errors messages by hiding internal details which can
135
be distracting and noisy.
136
This has the side effect that some error conditions that previously raised
137
generic errors (such as ValueError for unregistered marks) are now raising
138
Failed exceptions.
139
* Log messages generated in the collection phase are shown when live-logging
140
is enabled and/or when they are logged to a file.
141
* Introduce tmp_path as a fixture providing a Path object.
142
* Deprecation warnings are now shown even if you customize the warnings
143
filters yourself. In the previous version any customization would override
144
pytest’s filters and deprecation warnings would fall back to being hidden by default.
145
* Allow specification of timeout for Testdir.runpytest_subprocess() and Testdir.run().
146
* Add returncode argument to pytest.exit() to exit pytest with a specific return code.
147
* Reimplement pytest.deprecated_call using pytest.warns so it supports
148
the match='...' keyword argument.
149
This has the side effect that pytest.deprecated_call now raises
150
pytest.fail.Exception instead of AssertionError.
151
* Improve error message when test functions of unittest.TestCase subclasses
152
use a parametrized fixture.
153
* request.fixturenames now correctly returns the name of fixtures
154
created by request.getfixturevalue().
155
* Warning filters passed as command line options using -W now take precedence
156
over filters defined in ini configuration files.
157
* Fix source reindenting by using textwrap.dedent directly.
158
* pytest.warn will capture previously-warned warnings in Python 2.
159
Previously they were never raised.
160
* Resolve symbolic links for args.
161
This fixes running pytest tests/test_foo.py::test_bar, where tests is
162
a symlink to project/app/tests: previously project/app/conftest.py would be
163
ignored for fixtures then.
164
* Fix duplicate printing of internal errors when using --pdb.
165
* pathlib based tmpdir cleanup now correctly handles symlinks in the folder.
166
* Display the filename when encountering SyntaxWarning.
167
* Update usefixtures documentation to clarify that it can’t be used
168
with fixture functions.
169
* Update fixture documentation to specify that a fixture can be invoked twice
170
in the scope it’s defined for.
171
* According to unittest.rst, setUpModule and tearDownModule were not implemented,
172
but it turns out they are. So updated the documentation for unittest.
173
* Add tempir testing example to CONTRIBUTING.rst guide
174
* The internal MarkerError exception has been removed.
175
* Port the implementation of tmpdir to pathlib.
176
* Exclude 0.00 second entries from --duration output unless -vv is passed
177
on the command-line.
178
* Fixed formatting of string literals in internal tests.
179
180
-------------------------------------------------------------------
181
Mon Sep 24 10:43:29 UTC 2018 - Ondřej Súkup <mimi.vx@gmail.com>
182
183
- update to 3.8.1
184
- drop remove_mock.patch
185
* .pytest_cache directory is now automatically ignored by Git
186
* Fix the following error during collection of tests inside packages:
187
'TypeError: object of type 'Package' has no len()'
188
* Fix bug where indirect parametrization would consider the scope of all
189
fixtures used by the test function to determine the parametrization scope,
190
and not only the scope of the fixtures being parametrized.
191
* Fix crash of the assertion rewriter if a test changed the current working
192
directory without restoring it afterwards.
193
* Fix issue that prevented some caplog properties (for example record_tuples)
194
from being available when entering the debugger with --pdb.
195
* Fix UnicodeDecodeError in python2.x when a class returns a non-ascii binary
196
__repr__ in an assertion which also contains non-ascii text.
197
198
-------------------------------------------------------------------
199
Mon Sep 17 09:39:03 UTC 2018 - Ondřej Súkup <mimi.vx@gmail.com>
200
201
- update to 3.8.0
202
* Config.warn has been deprecated, it should be replaced by calls
203
to the standard warnings.warn.
204
* Node.warn now supports two signatures:
205
+ node.warn(PytestWarning("some message")): is now the recommended way
206
to call this function. The warning instance must be a PytestWarning
207
or subclass instance.
208
+ node.warn("CI", "some message"): this code/message form is now deprecated
209
and should be converted to the warning instance form above.
210
* RemovedInPytest4Warning and PytestExperimentalApiWarning are now part
211
of the public API and should be accessed using pytest.RemovedInPytest4Warning
212
and pytest.PytestExperimentalApiWarning.
213
* @pytest.mark.filterwarnings second parameter is no longer regex-escaped,
214
making it possible to actually use regular expressions to check the warning message.
215
+ Note: regex-escaping the match string was an implementation oversight
216
that might break test suites which depend on the old behavior.
217
* Internal pytest warnings are now issued using the standard warnings module,
218
making it possible to use the standard warnings filters to manage those
219
warnings. This introduces PytestWarning, PytestDeprecationWarning
220
and RemovedInPytest4Warning warning types as part of the public API.
221
* DeprecationWarning and PendingDeprecationWarning are now shown by default
222
if no other warning filter is configured. This makes pytest more compliant
223
with PEP-0506. See the docs for more info.
224
* Warnings are now captured and displayed during test collection.
225
* PYTEST_DISABLE_PLUGIN_AUTOLOAD environment variable disables
226
plugin auto-loading when set.
227
* Added the count option to console_output_style to enable displaying
228
the progress as a count instead of a percentage.
229
* Added support for ‘xfailed’ and ‘xpassed’ outcomes
230
to the pytester.RunResult.assert_outcomes signature.
231
232
-------------------------------------------------------------------
233
Tue Sep 4 16:10:55 UTC 2018 - Matěj Cepl <mcepl@suse.com>
234
235
- Remove unnecessary patch 0001-Use-unittest.mock-if-is-only-aviable.patch
236
(it has been already included in 3.7.4)
237
238
-------------------------------------------------------------------
239
Tue Sep 4 12:55:25 UTC 2018 - Ondřej Súkup <mimi.vx@gmail.com>
240
241
- update to 3.7.4
242
- drop 0001-Use-unittest.mock-if-is-only-aviable.patch
243
* Fix possible infinite recursion when writing .pyc files
244
* Cache plugin now obeys the -q flag when --last-failed and
245
--failed-first flags are used.
246
* Fix bad console output when using console_output_style=classic
247
* Fixtures during teardown can again use capsys and capfd to inspect
248
output captured during tests.
249
* Fix bugs where unicode arguments could not be passed to testdir.runpytest
250
on Python 2.
251
* Fix double collection of tests within packages when the filename starts
252
with a capital letter
253
* Fix collection error when specifying test functions directly in the command
254
line using test.py::test syntax together with --doctest-modules
255
* Fix stdout/stderr not getting captured when real-time cli logging is active.
256
* Fix bug where --show-capture=no option would still show logs printed during
257
fixture teardown.
258
* Fix issue where teardown of fixtures of consecutive sub-packages were
259
executed once, at the end of the outer package.
260
261
-------------------------------------------------------------------
262
Wed Aug 22 14:42:56 UTC 2018 - mimi.vx@gmail.com
263
264
- update to 3.7.2
265
- add 0001-Use-unittest.mock-if-is-only-aviable.patch
266
* Fix filterwarnings not being registered as a builtin mark.
267
* Fix test collection from packages mixed with normal directories.
268
* Fix infinite recursion during collection if a pytest_ignore_collect
269
hook returns False instead of None.
270
* Fix bug where decorated fixtures would lose functionality
271
* Fix bug where importing modules or other objects with prefix pytest_ prefix
272
would raise a PluginValidationError.
273
* Fix AttributeError during teardown of TestCase subclasses which raise
274
an exception during __init__.
275
* Fix traceback reporting for exceptions with __cause__ cycles.
276
277
-------------------------------------------------------------------
278
Tue Aug 7 14:47:56 UTC 2018 - mimi.vx@gmail.com
279
280
- update to 3.7.1
281
* Raise immediately if approx() is given an expected value of a type it
282
doesn’t understand (e.g. strings, nested dicts, etc.).
283
* Correctly represent the dimensions of an numpy array when calling repr() on approx().
284
* Fix incompatibility with third party plugins during collection, which
285
produced the error object has no attribute '_collectfile'.
286
* Display the absolute path if cache_dir is not relative to the rootdir instead of failing.
287
* Fix compatibility problem with plugins and the warning code issued
288
by fixture functions when they are called directly.
289
* Fix infinite recursion in pytest.approx with arrays in numpy<1.13.
290
* iFix TypeError when the assertion message is bytes in python 3.
291
292
-------------------------------------------------------------------
293
Thu Aug 2 12:57:23 UTC 2018 - mimi.vx@gmail.com
294
295
- update to 3.7.0
296
* pytest_namespace has been deprecated.
297
* Calling a fixture function directly, as opposed to request them in a test
298
function, now issues a RemovedInPytest4Warning.
299
* New package fixture scope: fixtures are finalized when the last test of
300
a package finishes. This feature is considered experimental, so use it sparingly.
301
* Node.add_marker now supports an append=True/False parameter to determine
302
whether the mark comes last (default) or first.
303
* Fixture caplog now has a messages property, providing convenient access
304
to the format-interpolated log messages without the extra data provided by the formatter/handler.
305
* New --trace option to enter the debugger at the start of a test.
306
* Introduce pytester.copy_example as helper to do acceptance tests
307
against examples from the project.
308
309
-------------------------------------------------------------------
310
Mon Jul 16 00:17:40 UTC 2018 - mimi.vx@gmail.com
311
312
- update to pytest-3.6.3
313
- drop python_mock.patch
314
* Fix ImportWarning triggered by explicit relative imports in assertion-rewritten
315
package modules.
316
* Fix error in pytest.approx when dealing with 0-dimension numpy arrays.
317
* No longer raise ValueError when using the get_marker API.
318
* Fix problem where log messages with non-ascii characters would not appear
319
in the output log file.
320
* No longer raise AttributeError when legacy marks can't be stored in functions.
321
322
-------------------------------------------------------------------
323
Fri Jun 22 15:48:06 UTC 2018 - mimi.vx@gmail.com
324
325
- update to 3.6.2
326
- add python_mock.patch for doc package
327
* Fix regression in Node.add_marker by extracting the mark object of
328
a MarkDecorator.
329
* Warnings without location were reported as None. This is corrected to now
330
report <undetermined location>.
331
* Continue to call finalizers in the stack when a finalizer in a former
332
scope raises an exception.
333
* Fix encoding error with print statements in doctests
334
* Improve display of hint about --fulltrace with KeyboardInterrupt.
335
* pytest’s testsuite is no longer runnable through python setup.py test
336
* fixed a bug where stdout and stderr were logged twice by junitxml when
337
a test was marked xfail.
338
* Fix usefixtures mark applyed to unittest tests by correctly
339
instantiating FixtureInfo.
340
* Fix assertion rewriter compatibility with libraries that monkey patch file objects
341
* switch pytest to the src/ layout as we already suggested it for good practice
342
* Fix if in tests to support 3.7.0b5, where a docstring handling in AST got reverted.
343
* Remove some python2.5 compatibility code.
344
345
-------------------------------------------------------------------
346
Thu May 31 04:42:41 UTC 2018 - toddrme2178@gmail.com
347
348
- Update to version 3.6.0
349
+ Features
350
* Revamp the internals of the ``pytest.mark`` implementation with correct per
351
node handling which fixes a number of long standing bugs caused by the old
352
design. This introduces new ``Node.iter_markers(name)`` and
353
``Node.get_closest_mark(name)`` APIs. Users are **strongly encouraged** to
354
read the `reasons for the revamp in the docs
355
<https://docs.pytest.org/en/latest/mark.html#marker-revamp-and-iteration>`_,
356
or jump over to details about `updating existing code to use the new APIs
357
<https://docs.pytest.org/en/latest/mark.html#updating-code>`_. (`#3317
358
<https://github.com/pytest-dev/pytest/issues/3317>`_)
359
* Now when ``@pytest.fixture`` is applied more than once to the same function a
360
``ValueError`` is raised. This buggy behavior would cause surprising problems
361
and if was working for a test suite it was mostly by accident. (`#2334
362
<https://github.com/pytest-dev/pytest/issues/2334>`_)
363
* Support for Python 3.7's builtin ``breakpoint()`` method, see `Using the
364
builtin breakpoint function
365
<https://docs.pytest.org/en/latest/usage.html#breakpoint-builtin>`_ for
366
details. (`#3180 <https://github.com/pytest-dev/pytest/issues/3180>`_)
367
* ``monkeypatch`` now supports a ``context()`` function which acts as a context
368
manager which undoes all patching done within the ``with`` block. (`#3290
369
<https://github.com/pytest-dev/pytest/issues/3290>`_)
370
* The ``--pdb`` option now causes KeyboardInterrupt to enter the debugger,
371
instead of stopping the test session. On python 2.7, hitting CTRL+C again
372
exits the debugger. On python 3.2 and higher, use CTRL+D. (`#3299
373
<https://github.com/pytest-dev/pytest/issues/3299>`_)
374
* pytest not longer changes the log level of the root logger when the
375
``log-level`` parameter has greater numeric value than that of the level of
376
the root logger, which makes it play better with custom logging configuration
377
in user code. (`#3307 <https://github.com/pytest-dev/pytest/issues/3307>`_)
378
+ Bug Fixes
379
* A rare race-condition which might result in corrupted ``.pyc`` files on
380
Windows has been hopefully solved. (`#3008
381
<https://github.com/pytest-dev/pytest/issues/3008>`_)
382
* Also use iter_marker for discovering the marks applying for marker
383
expressions from the cli to avoid the bad data from the legacy mark storage.
384
(`#3441 <https://github.com/pytest-dev/pytest/issues/3441>`_)
385
* When showing diffs of failed assertions where the contents contain only
386
whitespace, escape them using ``repr()`` first to make it easy to spot the
387
differences. (`#3443 <https://github.com/pytest-dev/pytest/issues/3443>`_)
388
+ Improved Documentation
389
* Change documentation copyright year to a range which auto-updates itself each
390
time it is published. (`#3303
391
<https://github.com/pytest-dev/pytest/issues/3303>`_)
392
+ Trivial/Internal Changes
393
* ``pytest`` now depends on the `python-atomicwrites
394
<https://github.com/untitaker/python-atomicwrites>`_ library. (`#3008
395
<https://github.com/pytest-dev/pytest/issues/3008>`_)
396
* Update all pypi.python.org URLs to pypi.org. (`#3431
397
<https://github.com/pytest-dev/pytest/issues/3431>`_)
398
* Detect `pytest_` prefixed hooks using the internal plugin manager since
399
``pluggy`` is deprecating the ``implprefix`` argument to ``PluginManager``.
400
(`#3487 <https://github.com/pytest-dev/pytest/issues/3487>`_)
401
* Import ``Mapping`` and ``Sequence`` from ``_pytest.compat`` instead of
402
directly from ``collections`` in ``python_api.py::approx``. Add ``Mapping``
403
to ``_pytest.compat``, import it from ``collections`` on python 2, but from
404
``collections.abc`` on Python 3 to avoid a ``DeprecationWarning`` on Python
405
3.7 or newer. (`#3497 <https://github.com/pytest-dev/pytest/issues/3497>`_)
406
407
-------------------------------------------------------------------
408
Sat Apr 28 19:38:40 UTC 2018 - arun@gmx.de
409
410
- update to version 3.5.1:
411
* Bug Fixes
412
+ Reset sys.last_type, sys.last_value and sys.last_traceback
413
before each test executes. Those attributes are added by pytest
414
during the test run to aid debugging, but were never reset so
415
they would create a leaking reference to the last failing test’s
416
frame which in turn could never be reclaimed by the garbage
417
collector. (#2798)
418
+ pytest.raises now raises TypeError when receiving an unknown
419
keyword argument. (#3348)
420
+ pytest.raises now works with exception classes that look like
421
iterables. (#3372)
422
* Improved Documentation
423
+ Fix typo in caplog fixture documentation, which incorrectly
424
identified certain attributes as methods. (#3406)
425
* Trivial/Internal Changes
426
+ Added a more indicative error message when parametrizing a
427
function whose argument takes a default value. (#3221)
428
+ Remove internal _pytest.terminal.flatten function in favor of
429
more_itertools.collapse. (#3330)
430
+ Import some modules from collections.abc instead of collections
431
as the former modules trigger DeprecationWarning in Python
432
3.7. (#3339)
433
+ record_property is no longer experimental, removing the warnings
434
was forgotten. (#3360)
435
+ Mention in documentation and CLI help that fixtures with leading
436
_ are printed by pytest --fixtures only if the -v option is
437
added. (#3398)
438
439
-------------------------------------------------------------------
440
Thu Mar 29 13:22:39 UTC 2018 - mimi.vx@gmail.com
441
442
- update to 3.5.0
443
- new install dependency python-more-itertools
444
- more changes in CHANGELOG.rst
445
446
-------------------------------------------------------------------
447
Fri Mar 9 08:37:51 UTC 2018 - mimi.vx@gmail.com
448
449
- update to 3.4.2
450
* Removed progress information when capture option is no.
451
* Refactor check of bindir from exists to isdir.
452
* Fix TypeError issue when using approx with a Decimal value.
453
* Fix reference cycle generated when using the request fixture.
454
* [tool:pytest] sections in *.cfg files passed by the
455
-c option are now properly recognized.
456
457
-------------------------------------------------------------------
458
Fri Mar 2 09:07:52 UTC 2018 - chris@computersalat.de
459
460
- fix dependencies for attrs, pluggy, py, six
461
462
-------------------------------------------------------------------
463
Thu Feb 22 20:37:25 UTC 2018 - mimi.vx@gmail.com
464
465
- update to 3.4.1
466
* Move import of doctest.UnexpectedException to top-level to avoid possible
467
errors when using --pdb.
468
* Added printing of captured stdout/stderr before entering pdb, and improved a
469
test which was giving false negatives about output capturing.
470
* Fix ordering of tests using parametrized fixtures which can lead to fixtures
471
being created more than necessary.
472
* Fix bug where logging happening at hooks outside of "test run" hooks would
473
cause an internal error.
474
* Detect arguments injected by unittest.mock.patch decorator correctly when
475
pypi mock.patch is installed and imported.
476
* Errors shown when a pytest.raises() with match= fails are now cleaner
477
on what happened: When no exception was raised, the "matching '...'" part got
478
removed as it falsely implies that an exception was raised but it didn't
479
match. When a wrong exception was raised, it's now thrown
480
instead of complaining about the unmatched text.
481
* Add Sphinx parameter docs for match and message args to pytest.raises
482
* Rename ParameterSet._for_parameterize() to _for_parametrize() in
483
order to comply with the naming convention.
484
485
-------------------------------------------------------------------
486
Sat Feb 10 17:59:11 UTC 2018 - arun@gmx.de
487
488
- update to version 3.4.0:
489
* Deprecations and Removals
490
+ All pytest classes now subclass object for better Python 2/3
491
compatibility. This should not affect user code except in very
492
rare edge cases. (#2147)
493
* Features
494
+ Introduce empty_parameter_set_mark ini option to select which
495
mark to apply when @pytest.mark.parametrize is given an empty
496
set of parameters. Valid options are skip (default) and
497
xfail. Note that it is planned to change the default to xfail in
498
future releases as this is considered less error prone. (#2527)
499
+ Incompatible change: after community feedback the logging
500
functionality has undergone some changes. Please consult the
501
logging documentation for details. (#3013)
502
+ Console output falls back to “classic” mode when capturing is
503
disabled (-s), otherwise the output gets garbled to the point of
504
being useless. (#3038)
505
+ New pytest_runtest_logfinish hook which is called when a test
506
item has finished executing, analogous to
507
pytest_runtest_logstart. (#3101)
508
+ Improve performance when collecting tests using many
509
fixtures. (#3107)
510
+ New caplog.get_records(when) method which provides access to the
511
captured records for the "setup", "call" and "teardown" testing
512
stages. (#3117)
513
+ New fixture record_xml_attribute that allows modifying and
514
inserting attributes on the <testcase> xml node in JUnit
515
reports. (#3130)
516
+ The default cache directory has been renamed from .cache to
517
.pytest_cache after community feedback that the name .cache did
518
not make it clear that it was used by pytest. (#3138)
519
+ Colorize the levelname column in the live-log output. (#3142)
520
* Bug Fixes
521
+ Fix hanging pexpect test on MacOS by using flush() instead of
522
wait(). (#2022)
523
+ Fix restoring Python state after in-process pytest runs with the
524
pytester plugin; this may break tests using multiple inprocess
525
pytest runs if later ones depend on earlier ones leaking global
526
interpreter changes. (#3016)
527
+ Fix skipping plugin reporting hook when test aborted before
528
plugin setup hook. (#3074)
529
+ Fix progress percentage reported when tests fail during
530
teardown. (#3088)
531
+ Incompatible change: -o/--override option no longer eats all the
532
remaining options, which can lead to surprising behavior: for
533
example, pytest -o foo=1 /path/to/test.py would fail because
534
/path/to/test.py would be considered as part of the -o
535
command-line argument. One consequence of this is that now
536
multiple configuration overrides need multiple -o flags: pytest
537
-o foo=1 -o bar=2. (#3103)
538
* Improved Documentation
539
+ Document hooks (defined with historic=True) which cannot be used
540
with hookwrapper=True. (#2423)
541
+ Clarify that warning capturing doesn’t change the warning filter
542
by default. (#2457)
543
+ Clarify a possible confusion when using pytest_fixture_setup
544
with fixture functions that return None. (#2698)
545
+ Fix the wording of a sentence on doctest flags used in
546
pytest. (#3076)
547
+ Prefer https://*.readthedocs.io over http://*.rtfd.org for links
548
in the documentation. (#3092)
549
+ Improve readability (wording, grammar) of Getting Started guide
550
(#3131)
551
+ Added note that calling pytest.main multiple times from the same
552
process is not recommended because of import caching. (#3143)
553
* Trivial/Internal Changes
554
+ Show a simple and easy error when keyword expressions trigger a
555
syntax error (for example, "-k foo and import" will show an
556
error that you can not use the import keyword in
557
expressions). (#2953)
558
+ Change parametrized automatic test id generation to use the
559
__name__ attribute of functions instead of the fallback argument
560
name plus counter. (#2976)
561
+ Replace py.std with stdlib imports. (#3067)
562
+ Corrected ‘you’ to ‘your’ in logging docs. (#3129)
563
564
-------------------------------------------------------------------
565
Sat Jan 6 05:25:16 UTC 2018 - arun@gmx.de
566
567
- specfile:
568
* update copyright year
569
570
- update to version 3.3.2:
571
* Bug Fixes
572
+ pytester: ignore files used to obtain current user metadata in
573
the fd leak detector. (#2784)
574
+ Fix memory leak where objects returned by fixtures were never
575
destructed by the garbage collector. (#2981)
576
+ Fix conversion of pyargs to filename to not convert symlinks and
577
not use deprecated features on Python 3. (#2985)
578
+ PYTEST_DONT_REWRITE is now checked for plugins too rather than
579
only for test modules. (#2995)
580
* Improved Documentation
581
+ Add clarifying note about behavior of multiple parametrized
582
arguments (#3001)
583
* Trivial/Internal Changes
584
+ Code cleanup. (#3015, #3021)
585
+ Clean up code by replacing imports and references of _ast to
586
ast. (#3018)
587
588
-------------------------------------------------------------------
589
Tue Dec 12 16:57:07 UTC 2017 - mimi.vx@gmail.com
590
591
- Cleanup BuildRequires
592
593
-------------------------------------------------------------------
594
Wed Dec 6 02:55:08 UTC 2017 - arun@gmx.de
595
596
- update to version 3.3.1:
597
* Bug Fixes
598
+ Fix issue about -p no:<plugin> having no effect. (#2920)
599
+ Fix regression with warnings that contained non-strings in their
600
arguments in Python 2. (#2956)
601
+ Always escape null bytes when setting
602
PYTEST_CURRENT_TEST. (#2957)
603
+ Fix ZeroDivisionError when using the testmon plugin when no
604
tests were actually collected. (#2971)
605
+ Bring back TerminalReporter.writer as an alias to
606
TerminalReporter._tw. This alias was removed by accident in the
607
3.3.0 release. (#2984)
608
+ The pytest-capturelog plugin is now also blacklisted, avoiding
609
errors when running pytest with it still installed. (#3004)
610
* Improved Documentation
611
+ Fix broken link to plugin pytest-localserver. (#2963)
612
* Trivial/Internal Changes
613
+ Update github “bugs” link in CONTRIBUTING.rst (#2949)
614
615
-------------------------------------------------------------------
616
Tue Nov 28 18:58:11 UTC 2017 - arun@gmx.de
617
618
- specfile:
619
* add requirement for attr and pluggy
620
* add requirement for funcsigs for python2 only
621
622
- update to version 3.3.0:
623
* Deprecations and Removals
624
+ Pytest no longer supports Python 2.6 and 3.3. Those Python
625
versions are EOL for some time now and incur maintenance and
626
compatibility costs on the pytest core team, and following up
627
with the rest of the community we decided that they will no
628
longer be supported starting on this version. Users which still
629
require those versions should pin pytest to <3.3. (#2812)
630
+ Remove internal _preloadplugins() function. This removal is part
631
of the pytest_namespace() hook deprecation. (#2636)
632
+ Internally change CallSpec2 to have a list of marks instead of a
633
broken mapping of keywords. This removes the keywords attribute
634
of the internal CallSpec2 class. (#2672)
635
+ Remove ParameterSet.deprecated_arg_dict - its not a public api
636
and the lack of the underscore was a naming error. (#2675)
637
+ Remove the internal multi-typed attribute Node._evalskip and
638
replace it with the boolean Node._skipped_by_mark. (#2767)
639
* Features
640
+ pytest_fixture_post_finalizer hook can now receive a request
641
argument. (#2124)
642
+ Replace the old introspection code in compat.py that determines
643
the available arguments of fixtures with inspect.signature on
644
Python 3 and funcsigs.signature on Python 2. This should respect
645
__signature__ declarations on functions. (#2267)
646
+ Report tests with global pytestmark variable only once. (#2549)
647
+ Now pytest displays the total progress percentage while running
648
tests. The previous output style can be set by configuring the
649
console_output_style setting to classic. (#2657)
650
+ Match warns signature to raises by adding match keyword. (#2708)
651
+ Pytest now captures and displays output from the standard
652
logging module. The user can control the logging level to be
653
captured by specifying options in pytest.ini, the command line
654
and also during individual tests using markers. Also, a caplog
655
fixture is available that enables users to test the captured log
656
during specific tests (similar to capsys for example). For more
657
information, please see the logging docs. This feature was
658
introduced by merging the popular pytest-catchlog plugin, thanks
659
to Thomas Hisch. Be advised that during the merging the backward
660
compatibility interface with the defunct pytest-capturelog has
661
been dropped. (#2794)
662
+ Add allow_module_level kwarg to pytest.skip(), enabling to skip
663
the whole module. (#2808)
664
+ Allow setting file_or_dir, -c, and -o in PYTEST_ADDOPTS. (#2824)
665
+ Return stdout/stderr capture results as a namedtuple, so out and
666
err can be accessed by attribute. (#2879)
667
+ Add capfdbinary, a version of capfd which returns bytes from
668
readouterr(). (#2923)
669
+ Add capsysbinary a version of capsys which returns bytes from
670
readouterr(). (#2934)
671
+ Implement feature to skip setup.py files when run with
672
--doctest-modules. (#502)
673
* Bug Fixes
674
+ Resume output capturing after capsys/capfd.disabled() context
675
manager. (#1993)
676
+ pytest_fixture_setup and pytest_fixture_post_finalizer hooks are
677
now called for all conftest.py files. (#2124)
678
+ If an exception happens while loading a plugin, pytest no longer
679
hides the original traceback. In python2 it will show the
680
original traceback with a new message that explains in which
681
plugin. In python3 it will show 2 canonized exceptions, the
682
original exception while loading the plugin in addition to an
683
exception that PyTest throws about loading a plugin. (#2491)
684
+ capsys and capfd can now be used by other fixtures. (#2709)
685
+ Internal pytester plugin properly encodes bytes arguments to
686
utf-8. (#2738)
687
+ testdir now uses use the same method used by tmpdir to create
688
its temporary directory. This changes the final structure of the
689
testdir directory slightly, but should not affect usage in
690
normal scenarios and avoids a number of potential
691
problems. (#2751)
692
+ Pytest no longer complains about warnings with unicode messages
693
being non-ascii compatible even for ascii-compatible
694
messages. As a result of this, warnings with unicode messages
695
are converted first to an ascii representation for
696
safety. (#2809)
697
+ Change return value of pytest command when --maxfail is reached
698
from 2 (interrupted) to 1 (failed). (#2845)
699
+ Fix issue in assertion rewriting which could lead it to rewrite
700
modules which should not be rewritten. (#2939)
701
+ Handle marks without description in pytest.ini. (#2942)
702
* Trivial/Internal Changes
703
+ pytest now depends on attrs for internal structures to ease code
704
maintainability. (#2641)
705
+ Refactored internal Python 2/3 compatibility code to use
706
six. (#2642)
707
+ Stop vendoring pluggy - we’re missing out on its latest changes
708
for not much benefit (#2719)
709
+ Internal refactor: simplify ascii string escaping by using the
710
backslashreplace error handler in newer Python 3
711
versions. (#2734)
712
+ Remove unnecessary mark evaluator in unittest plugin (#2767)
713
+ Calls to Metafunc.addcall now emit a deprecation warning. This
714
function is scheduled to be removed in pytest-4.0. (#2876)
715
+ Internal move of the parameterset extraction to a more
716
maintainable place. (#2877)
717
+ Internal refactoring to simplify scope node lookup. (#2910)
718
+ Configure pytest to prevent pip from installing pytest in
719
unsupported Python versions. (#2922)
720
721
-------------------------------------------------------------------
722
Wed Nov 15 12:18:45 UTC 2017 - mimi.vx@gmail.com
723
724
- update to 3.2.5
725
* don't limit py<1.5
726
727
-------------------------------------------------------------------
728
Wed Nov 15 07:04:29 UTC 2017 - arun@gmx.de
729
730
- update to version 3.2.4:
731
* Bug Fixes
732
+ Fix the bug where running with --pyargs will result in items
733
with empty parent.nodeid if run from a different root
734
directory. (#2775)
735
+ Fix issue with @pytest.parametrize if argnames was specified as
736
keyword arguments. (#2819)
737
+ Strip whitespace from marker names when reading them from INI
738
config. (#2856)
739
+ Show full context of doctest source in the pytest output, if the
740
line number of failed example in the docstring is < 9. (#2882)
741
* Improved Documentation
742
+ Introduce a dedicated section about conftest.py. (#1505)
743
+ Explicitly mention xpass in the documentation of xfail. (#1997)
744
+ Append example for pytest.param in the example/parametrize
745
document. (#2658)
746
+ Clarify language of proposal for fixtures parameters (#2893)
747
+ List python 3.6 in the documented supported versions in the
748
getting started document. (#2903)
749
+ Clarify the documentation of available fixture scopes. (#538)
750
+ Add documentation about the python -m pytest invocation adding
751
the current directory to sys.path. (#911)
752
753
-------------------------------------------------------------------
754
Mon Oct 30 16:03:56 UTC 2017 - jmatejek@suse.com
755
756
- update to more modern singlespec macros
757
- make build work when python2 is missing
758
759
-------------------------------------------------------------------
760
Thu Oct 5 16:16:23 UTC 2017 - arun@gmx.de
761
762
- update to version 3.2.3:
763
* Bug Fixes
764
+ Fix crash in tab completion when no prefix is given. (#2748)
765
+ The equality checking function (__eq__) of MarkDecorator returns
766
False if one object is not an instance of MarkDecorator. (#2758)
767
+ When running pytest --fixtures-per-test: don’t crash if an item
768
has no _fixtureinfo attribute (e.g. doctests) (#2788)
769
* Improved Documentation
770
+ In help text of -k option, add example of using not to not
771
select certain tests whose names match the provided
772
expression. (#1442)
773
+ Add note in parametrize.rst about calling metafunc.parametrize
774
multiple times. (#1548)
775
* Trivial/Internal Changes
776
+ Set xfail_strict=True in pytest’s own test suite to catch
777
expected failures as soon as they start to pass. (#2722)
778
+ Fix typo in example of passing a callable to markers (in
779
example/markers.rst) (#2765)
780
781
-------------------------------------------------------------------
782
Thu Sep 28 17:52:11 UTC 2017 - sean.marlow@suse.com
783
784
- Fix python-py version requirement.
785
- Update to 3.2.2:
786
* Bug Fixes
787
- Calling the deprecated request.getfuncargvalue() now shows the
788
source of the call. (#2681)
789
- Allow tests declared as @staticmethod to use fixtures. (#2699)
790
- Fixed edge-case during collection: attributes which raised
791
pytest.fail when accessed would abort the entire collection.
792
(#2707)
793
- Fix ReprFuncArgs with mixed unicode and UTF-8 args. (#2731)
794
* Improved Documentation
795
- In examples on working with custom markers, add examples
796
demonstrating the usage of pytest.mark.MARKER_NAME.with_args
797
in comparison with pytest.mark.MARKER_NAME.__call__ (#2604)
798
- In one of the simple examples, use
799
pytest_collection_modifyitems() to skip tests based on a
800
command-line option, allowing its sharing while preventing a
801
user error when acessing pytest.config before the argument
802
parsing. (#2653)
803
* Trivial/Internal Changes
804
- Fixed minor error in 'Good Practices/Manual Integration' code
805
snippet. (#2691)
806
- Fixed typo in goodpractices.rst. (#2721)
807
- Improve user guidance regarding --resultlog deprecation.
808
(#2739)
809
810
-------------------------------------------------------------------
811
Fri Aug 25 15:23:41 UTC 2017 - jengelh@inai.de
812
813
- Replace sensationalist wording.
814
815
-------------------------------------------------------------------
816
Fri Aug 25 10:01:40 UTC 2017 - sebix+novell.com@sebix.at
817
818
- update to 3.2.1, shortened changelogs:
819
* Pytest 3.2.1 (2017-08-08)
820
* Bug Fixes
821
- Fixed small terminal glitch when collecting a single test item. (#2579)
822
- Correctly consider / as the file separator to automatically mark plugin
823
files for rewrite on Windows. (#2591)
824
- Properly escape test names when setting PYTEST_CURRENT_TEST environment
825
variable. (#2644)
826
- Fix error on Windows and Python 3.6+ when sys.stdout has been replaced
827
with a stream-like object which does not implement the full io module
828
buffer protocol. In particular this affects pytest-xdist users on the
829
aforementioned platform. (#2666)
830
* Improved Documentation
831
- Explicitly document which pytest features work with unittest. (#2626)
832
* Pytest 3.2.0 (2017-07-30)
833
* Deprecations and Removals
834
- pytest.approx no longer supports >, >=, < and <=
835
operators to avoid surprising/inconsistent behavior. See the docs
836
<https://docs.pytest.org/en/latest/builtin.html#pytest.approx> for more
837
information. (#2003)
838
- All old-style specific behavior in current classes in the pytest's API is
839
considered deprecated at this point and will be removed in a future release.
840
This affects Python 2 users only and in rare situations. (#2147)
841
- A deprecation warning is now raised when using marks for parameters
842
in pytest.mark.parametrize. Use pytest.param to apply marks to
843
parameters instead. (#2427)
844
* Features
845
- Add support for numpy arrays (and dicts) to approx. (#1994)
846
- Now test function objects have a pytestmark attribute containing a list
847
of marks applied directly to the test function, as opposed to marks inherited
848
from parent classes or modules. (#2516)
849
- Collection ignores local virtualenvs by default; `--collect-in-virtualenv`
850
overrides this behavior. (#2518)
851
- Allow class methods decorated as @staticmethod to be candidates for
852
collection as a test function. (Only for Python 2.7 and above. Python 2.6
853
will still ignore static methods.) (#2528)
854
- Introduce mark.with_args in order to allow passing functions/classes as
855
sole argument to marks. (#2540)
856
- New cache_dir ini option: sets the directory where the contents of the
857
cache plugin are stored. Directory may be relative or absolute path: if relative path, then
858
directory is created relative to rootdir, otherwise it is used as is.
859
Additionally path may contain environment variables which are expanded during
860
runtime. (#2543)
861
- Introduce the PYTEST_CURRENT_TEST environment variable that is set with
862
the nodeid and stage (setup, call and teardown) of the test
863
being currently executed. See the documentation
864
<https://docs.pytest.org/en/latest/example/simple.html#pytest-current-test-
865
environment-variable> for more info. (#2583)
866
- Introduced @pytest.mark.filterwarnings mark which allows overwriting the
867
warnings filter on a per test, class or module level. See the docs
868
<https://docs.pytest.org/en/latest/warnings.html#pytest-mark-
869
filterwarnings> for more information. (#2598)
870
- --last-failed now remembers forever when a test has failed and only
871
forgets it if it passes again. This makes it easy to fix a test suite by
872
selectively running files and fixing tests incrementally. (#2621)
873
- New pytest_report_collectionfinish hook which allows plugins to add
874
messages to the terminal reporting after collection has been finished
875
successfully. (#2622)
876
- Added support for PEP-415's <https://www.python.org/dev/peps/pep-0415/>
877
Exception.__suppress_context__. Now if a raise exception from None is
878
caught by pytest, pytest will no longer chain the context in the test report.
879
The behavior now matches Python's traceback behavior. (#2631)
880
- Exceptions raised by pytest.fail, pytest.skip and pytest.xfail
881
now subclass BaseException, making them harder to be caught unintentionally
882
by normal code. (#580)
883
* Bug Fixes
884
- Set stdin to a closed PIPE in pytester.py.Testdir.popen() for
885
avoid unwanted interactive pdb (#2023)
886
- Add missing encoding attribute to sys.std* streams when using
887
capsys capture mode. (#2375)
888
- Fix terminal color changing to black on Windows if colorama is imported
889
in a conftest.py file. (#2510)
890
- Fix line number when reporting summary of skipped tests. (#2548)
891
- capture: ensure that EncodedFile.name is a string. (#2555)
892
- The options --fixtures and --fixtures-per-test will now keep
893
indentation within docstrings. (#2574)
894
- doctests line numbers are now reported correctly, fixing pytest-sugar#122
895
<https://github.com/Frozenball/pytest-sugar/issues/122>. (#2610)
896
- Fix non-determinism in order of fixture collection. Adds new dependency
897
(ordereddict) for Python 2.6. (#920)
898
* Improved Documentation
899
- Clarify pytest_configure hook call order. (#2539)
900
- Extend documentation for testing plugin code with the pytester plugin.
901
(#971)
902
* Pytest 3.1.3 (2017-07-03)
903
* Bug Fixes
904
- Fix decode error in Python 2 for doctests in docstrings. (#2434)
905
- Exceptions raised during teardown by finalizers are now suppressed until all
906
finalizers are called, with the initial exception reraised. (#2440)
907
- Fix incorrect "collected items" report when specifying tests on the command-
908
line. (#2464)
909
- deprecated_call in context-manager form now captures deprecation warnings
910
even if the same warning has already been raised. Also, deprecated_call
911
will always produce the same error message (previously it would produce
912
different messages in context-manager vs. function-call mode). (#2469)
913
- Fix issue where paths collected by pytest could have triple leading /
914
characters. (#2475)
915
- Fix internal error when trying to detect the start of a recursive traceback.
916
(#2486)
917
* Improved Documentation
918
- Explicitly state for which hooks the calls stop after the first non-None
919
result. (#2493)
920
* Pytest 3.1.2 (2017-06-08)
921
* Bug Fixes
922
- Required options added via pytest_addoption will no longer prevent using
923
--help without passing them. (#1999)
924
- Respect python_files in assertion rewriting. (#2121)
925
- Fix recursion error detection when frames in the traceback contain objects
926
that can't be compared (like numpy arrays). (#2459)
927
- UnicodeWarning is issued from the internal pytest warnings plugin only
928
when the message contains non-ascii unicode (Python 2 only). (#2463)
929
- Added a workaround for Python 3.6 WindowsConsoleIO breaking due to Pytests's
930
FDCapture. Other code using console handles might still be affected by the
931
very same issue and might require further workarounds/fixes, i.e. colorama.
932
(#2467)
933
* Improved Documentation
934
- Fix internal API links to pluggy objects. (#2331)
935
- Make it clear that pytest.xfail stops test execution at the calling point
936
and improve overall flow of the skipping docs. (#810)
937
* Pytest 3.1.1 (2017-05-30)
938
* Bug Fixes
939
- pytest warning capture no longer overrides existing warning filters. The
940
previous behaviour would override all filters and caused regressions in test
941
suites which configure warning filters to match their needs. Note that as a
942
side-effect of this is that DeprecationWarning and
943
PendingDeprecationWarning are no longer shown by default. (#2430)
944
- Fix issue with non-ascii contents in doctest text files. (#2434)
945
- Fix encoding errors for unicode warnings in Python 2. (#2436)
946
- pytest.deprecated_call now captures PendingDeprecationWarning in
947
context manager form. (#2441)
948
* Improved Documentation
949
- Addition of towncrier for changelog management. (#2390)
950
* 3.1.0 (2017-05-22)
951
* New Features
952
* The pytest-warnings plugin has been integrated into the core and now pytest automatically
953
captures and displays warnings at the end of the test session.
954
.. warning::
955
This feature may disrupt test suites which apply and treat warnings themselves, and can be
956
disabled in your pytest.ini:
957
.. code-block:: ini
958
[pytest]
959
addopts = -p no:warnings
960
See the warnings documentation page <https://docs.pytest.org/en/latest/warnings.html> for more
961
information.
962
Thanks @nicoddemus for the PR.
963
* Added junit_suite_name ini option to specify root <testsuite> name for JUnit XML reports (#533).
964
* Added an ini option doctest_encoding to specify which encoding to use for doctest files.
965
Thanks @wheerd for the PR (#2101).
966
* pytest.warns now checks for subclass relationship rather than
967
class equality. Thanks @lesteve for the PR (#2166)
968
* pytest.raises now asserts that the error message matches a text or regex
969
with the match keyword argument. Thanks @Kriechi for the PR.
970
* pytest.param can be used to declare test parameter sets with marks and test ids.
971
Thanks @RonnyPfannschmidt for the PR.
972
* Changes
973
* remove all internal uses of pytest_namespace hooks,
974
this is to prepare the removal of preloadconfig in pytest 4.0
975
Thanks to @RonnyPfannschmidt for the PR.
976
* pytest now warns when a callable ids raises in a parametrized test. Thanks @fogo for the PR.
977
* It is now possible to skip test classes from being collected by setting a
978
__test__ attribute to False in the class body (#2007). Thanks
979
to @syre for the report and @lwm for the PR.
980
* Change junitxml.py to produce reports that comply with Junitxml schema.
981
If the same test fails with failure in call and then errors in teardown
982
we split testcase element into two, one containing the error and the other
983
the failure. (#2228) Thanks to @kkoukiou for the PR.
984
* Testcase reports with a url attribute will now properly write this to junitxml.
985
Thanks @fushi for the PR (#1874).
986
* Remove common items from dict comparision output when verbosity=1. Also update
987
the truncation message to make it clearer that pytest truncates all
988
assertion messages if verbosity < 2 (#1512).
989
Thanks @mattduck for the PR
990
* --pdbcls no longer implies --pdb. This makes it possible to use
991
addopts=--pdbcls=module.SomeClass on pytest.ini. Thanks @davidszotten for
992
the PR (#1952).
993
* fix #2013: turn RecordedWarning into namedtuple,
994
to give it a comprehensible repr while preventing unwarranted modification.
995
* fix #2208: ensure a iteration limit for _pytest.compat.get_real_func.
996
Thanks @RonnyPfannschmidt for the report and PR.
997
* Hooks are now verified after collection is complete, rather than right after loading installed plugins. This
998
makes it easy to write hooks for plugins which will be loaded during collection, for example using the
999
pytest_plugins special variable (#1821).
1000
Thanks @nicoddemus for the PR.
1001
* Modify pytest_make_parametrize_id() hook to accept argname as an
1002
additional parameter.
1003
Thanks @unsignedint for the PR.
1004
* Add venv to the default norecursedirs setting.
1005
Thanks @The-Compiler for the PR.
1006
* PluginManager.import_plugin now accepts unicode plugin names in Python 2.
1007
Thanks @reutsharabani for the PR.
1008
* fix #2308: When using both --lf and --ff, only the last failed tests are run.
1009
Thanks @ojii for the PR.
1010
* Replace minor/patch level version numbers in the documentation with placeholders.
1011
This significantly reduces change-noise as different contributors regnerate
1012
the documentation on different platforms.
1013
Thanks @RonnyPfannschmidt for the PR.
1014
* fix #2391: consider pytest_plugins on all plugin modules
1015
Thanks @RonnyPfannschmidt for the PR.
1016
* Bug Fixes
1017
* Fix AttributeError on sys.stdout.buffer / sys.stderr.buffer
1018
while using capsys fixture in python 3. (#1407).
1019
Thanks to @asottile.
1020
* Change capture.py's DontReadFromInput class to throw io.UnsupportedOperation errors rather
1021
than ValueErrors in the fileno method (#2276).
1022
Thanks @metasyn and @vlad-dragos for the PR.
1023
* Fix exception formatting while importing modules when the exception message
1024
contains non-ascii characters (#2336).
1025
Thanks @fabioz for the report and @nicoddemus for the PR.
1026
* Added documentation related to issue (#1937)
1027
Thanks @skylarjhdownes for the PR.
1028
* Allow collecting files with any file extension as Python modules (#2369).
1029
Thanks @Kodiologist for the PR.
1030
* Show the correct error message when collect "parametrize" func with wrong args (#2383).
1031
Thanks @The-Compiler for the report and @robin0371 for the PR.
1032
1033
-------------------------------------------------------------------
1034
Wed Aug 9 17:07:31 UTC 2017 - dmueller@suse.com
1035
1036
- skip creating a python3 symlink when only python2.x is being built
1037
1038
-------------------------------------------------------------------
1039
Thu Mar 30 09:29:28 UTC 2017 - aloisio@gmx.com
1040
1041
- Update to version 3.0.7
1042
* Fix issue in assertion rewriting breaking due to modules
1043
silently discarding other modules when importing fails
1044
Notably, importing the `anydbm` module is fixed.
1045
(`#2248`_). Thanks `@pfhayes`_ for the PR.
1046
* junitxml: Fix problematic case where system-out tag
1047
occured twice per testcase element in the XML report.
1048
Thanks `@kkoukiou`_ for the PR.
1049
* Fix regression, pytest now skips unittest correctly if run
1050
with ``--pdb`` (`#2137`_). Thanks to `@gst`_ for the report
1051
and `@mbyt`_ for the PR.
1052
* Ignore exceptions raised from descriptors (e.g.
1053
properties) during Python test collection (`#2234`_).
1054
Thanks to `@bluetech`_.
1055
* ``--override-ini`` now correctly overrides some
1056
fundamental options like ``python_files`` (`#2238`_).
1057
Thanks `@sirex`_ for the report and `@nicoddemus`_ for the
1058
PR.
1059
* Replace ``raise StopIteration`` usages in the code by
1060
simple ``returns`` to finish generators, in accordance to
1061
`PEP-479`_ (`#2160`_). Thanks `@tgoodlet`_ for the report
1062
and `@nicoddemus`_ for the PR.
1063
* Fix internal errors when an unprintable ``AssertionError``
1064
is raised inside a test. Thanks `@omerhadari`_ for the PR.
1065
* Skipping plugin now also works with test items generated
1066
by custom collectors (`#2231`_). Thanks to `@vidartf`_.
1067
* Fix trailing whitespace in console output if no .ini file
1068
presented (`#2281`_). Thanks `@fbjorn`_ for the PR.
1069
* Conditionless ``xfail`` markers no longer rely on the
1070
underlying test item being an instance of ``PyobjMixin``,
1071
and can therefore apply to tests not collected by the
1072
built-in python test collector. Thanks `@barneygale`_ for
1073
the PR.
1074
1075
- Updated source URL
1076
1077
-------------------------------------------------------------------
1078
Wed Mar 29 13:53:04 UTC 2017 - jmatejek@suse.com
1079
1080
- uninstall alternatives in %postun
1081
1082
-------------------------------------------------------------------
1083
Mon Feb 20 14:05:32 UTC 2017 - jmatejek@suse.com
1084
1085
- update for singlespec
1086
- update to 3.0.6
1087
* the ids argument to parametrize again accepts unicode in python2
1088
* import errors for plugins now display full traceback
1089
* no longer recognizes coroutine functions as yield tests
1090
* see more in changelog
1091
1092
-------------------------------------------------------------------
1093
Fri Sep 16 14:25:04 UTC 2016 - toddrme2178@gmail.com
1094
1095
- Fix download url.
1096
1097
-------------------------------------------------------------------
1098
Thu Sep 15 22:20:01 UTC 2016 - toddrme2178@gmail.com
1099
1100
- update to version 3.0.2
1101
* Improve error message when passing non-string ids to ``pytest.mark.parametrize`` (`#1857`_).
1102
Thanks `@okken`_ for the report and `@nicoddemus`_ for the PR.
1103
* Add ``buffer`` attribute to stdin stub class ``pytest.capture.DontReadFromInput``
1104
Thanks `@joguSD`_ for the PR.
1105
* Fix ``UnicodeEncodeError`` when string comparison with unicode has failed. (`#1864`_)
1106
Thanks `@AiOO`_ for the PR.
1107
* ``pytest_plugins`` is now handled correctly if defined as a string (as opposed as
1108
a sequence of strings) when modules are considered for assertion rewriting.
1109
Due to this bug, much more modules were being rewritten than necessary
1110
if a test suite uses ``pytest_plugins`` to load internal plugins (`#1888`_).
1111
Thanks `@jaraco`_ for the report and `@nicoddemus`_ for the PR (`#1891`_).
1112
* Do not call tearDown and cleanups when running tests from
1113
``unittest.TestCase`` subclasses with ``--pdb``
1114
enabled. This allows proper post mortem debugging for all applications
1115
which have significant logic in their tearDown machinery (`#1890`_). Thanks
1116
`@mbyt`_ for the PR.
1117
* Fix use of deprecated ``getfuncargvalue`` method in the internal doctest plugin.
1118
Thanks `@ViviCoder`_ for the report (`#1898`_).
1119
- update to version 3.0.1
1120
* Fix regression when ``importorskip`` is used at module level (`#1822`_).
1121
Thanks `@jaraco`_ and `@The-Compiler`_ for the report and `@nicoddemus`_ for the PR.
1122
* Fix parametrization scope when session fixtures are used in conjunction
1123
with normal parameters in the same call (`#1832`_).
1124
Thanks `@The-Compiler`_ for the report, `@Kingdread`_ and `@nicoddemus`_ for the PR.
1125
* Fix internal error when parametrizing tests or fixtures using an empty ``ids`` argument (`#1849`_).
1126
Thanks `@OPpuolitaival`_ for the report and `@nicoddemus`_ for the PR.
1127
* Fix loader error when running ``pytest`` embedded in a zipfile.
1128
Thanks `@mbachry`_ for the PR.
1129
- update to version 3.0.0
1130
+ Incompatible changes
1131
* Reinterpretation mode has now been removed. Only plain and rewrite
1132
mode are available, consequently the ``--assert=reinterp`` option is
1133
no longer available. Thanks `@flub`_ for the PR.
1134
* The following deprecated commandline options were removed:
1135
* ``--genscript``: no longer supported;
1136
> ``--no-assert``: use ``--assert=plain`` instead;
1137
> ``--nomagic``: use ``--assert=plain`` instead;
1138
> ``--report``: use ``-r`` instead;
1139
* ImportErrors in plugins now are a fatal error instead of issuing a
1140
pytest warning (`#1479`_). Thanks to `@The-Compiler`_ for the PR.
1141
* Removed support code for Python 3 versions < 3.3 (`#1627`_).
1142
* Removed all ``py.test-X*`` entry points. The versioned, suffixed entry points
1143
were never documented and a leftover from a pre-virtualenv era. These entry
1144
points also created broken entry points in wheels, so removing them also
1145
removes a source of confusion for users (`#1632`_).
1146
Thanks `@obestwalter`_ for the PR.
1147
* ``pytest.skip()`` now raises an error when used to decorate a test function,
1148
as opposed to its original intent (to imperatively skip a test inside a test function). Previously
1149
this usage would cause the entire module to be skipped (`#607`_).
1150
Thanks `@omarkohl`_ for the complete PR (`#1519`_).
1151
* Exit tests if a collection error occurs. A poll indicated most users will hit CTRL-C
1152
anyway as soon as they see collection errors, so pytest might as well make that the default behavior (`#1421`_).
1153
A ``--continue-on-collection-errors`` option has been added to restore the previous behaviour.
1154
Thanks `@olegpidsadnyi`_ and `@omarkohl`_ for the complete PR (`#1628`_).
1155
* Renamed the pytest ``pdb`` module (plugin) into ``debugging`` to avoid clashes with the builtin ``pdb`` module.
1156
* Raise a helpful failure message when requesting a parametrized fixture at runtime,
1157
e.g. with ``request.getfixturevalue``. Previously these parameters were simply
1158
never defined, so a fixture decorated like ``@pytest.fixture(params=[0, 1, 2])``
1159
only ran once (`#460`_).
1160
Thanks to `@nikratio`_ for the bug report, `@RedBeardCode`_ and `@tomviner`_ for the PR.
1161
* ``_pytest.monkeypatch.monkeypatch`` class has been renamed to ``_pytest.monkeypatch.MonkeyPatch``
1162
so it doesn't conflict with the ``monkeypatch`` fixture.
1163
* ``--exitfirst / -x`` can now be overridden by a following ``--maxfail=N``
1164
and is just a synonym for ``--maxfail=1``.
1165
+ New Features
1166
* Support nose-style ``__test__`` attribute on methods of classes,
1167
including unittest-style Classes. If set to ``False``, the test will not be
1168
collected.
1169
* New ``doctest_namespace`` fixture for injecting names into the
1170
namespace in which doctests run.
1171
Thanks `@milliams`_ for the complete PR (`#1428`_).
1172
* New ``--doctest-report`` option available to change the output format of diffs
1173
when running (failing) doctests (implements `#1749`_).
1174
Thanks `@hartym`_ for the PR.
1175
* New ``name`` argument to ``pytest.fixture`` decorator which allows a custom name
1176
for a fixture (to solve the funcarg-shadowing-fixture problem).
1177
Thanks `@novas0x2a`_ for the complete PR (`#1444`_).
1178
* New ``approx()`` function for easily comparing floating-point numbers in
1179
tests.
1180
Thanks `@kalekundert`_ for the complete PR (`#1441`_).
1181
* Ability to add global properties in the final xunit output file by accessing
1182
the internal ``junitxml`` plugin (experimental).
1183
Thanks `@tareqalayan`_ for the complete PR `#1454`_).
1184
* New ``ExceptionInfo.match()`` method to match a regular expression on the
1185
string representation of an exception (`#372`_).
1186
Thanks `@omarkohl`_ for the complete PR (`#1502`_).
1187
* ``__tracebackhide__`` can now also be set to a callable which then can decide
1188
whether to filter the traceback based on the ``ExceptionInfo`` object passed
1189
to it. Thanks `@The-Compiler`_ for the complete PR (`#1526`_).
1190
* New ``pytest_make_parametrize_id(config, val)`` hook which can be used by plugins to provide
1191
friendly strings for custom types.
1192
Thanks `@palaviv`_ for the PR.
1193
* ``capsys`` and ``capfd`` now have a ``disabled()`` context-manager method, which
1194
can be used to temporarily disable capture within a test.
1195
Thanks `@nicoddemus`_ for the PR.
1196
* New cli flag ``--fixtures-per-test``: shows which fixtures are being used
1197
for each selected test item. Features doc strings of fixtures by default.
1198
Can also show where fixtures are defined if combined with ``-v``.
1199
Thanks `@hackebrot`_ for the PR.
1200
* Introduce ``pytest`` command as recommended entry point. Note that ``py.test``
1201
still works and is not scheduled for removal. Closes proposal
1202
`#1629`_. Thanks `@obestwalter`_ and `@davehunt`_ for the complete PR
1203
(`#1633`_).
1204
* New cli flags:
1205
> ``--setup-plan``: performs normal collection and reports
1206
the potential setup and teardown and does not execute any fixtures and tests;
1207
> ``--setup-only``: performs normal collection, executes setup and teardown of
1208
fixtures and reports them;
1209
> ``--setup-show``: performs normal test execution and additionally shows
1210
setup and teardown of fixtures;
1211
> ``--keep-duplicates``: py.test now ignores duplicated paths given in the command
1212
line. To retain the previous behavior where the same test could be run multiple
1213
times by specifying it in the command-line multiple times, pass the ``--keep-duplicates``
1214
argument (`#1609`_);
1215
Thanks `@d6e`_, `@kvas-it`_, `@sallner`_, `@ioggstream`_ and `@omarkohl`_ for the PRs.
1216
* New CLI flag ``--override-ini``/``-o``: overrides values from the ini file.
1217
For example: ``"-o xfail_strict=True"``'.
1218
Thanks `@blueyed`_ and `@fengxx`_ for the PR.
1219
* New hooks:
1220
> ``pytest_fixture_setup(fixturedef, request)``: executes fixture setup;
1221
> ``pytest_fixture_post_finalizer(fixturedef)``: called after the fixture's
1222
finalizer and has access to the fixture's result cache.
1223
Thanks `@d6e`_, `@sallner`_.
1224
* Issue warnings for asserts whose test is a tuple literal. Such asserts will
1225
never fail because tuples are always truthy and are usually a mistake
1226
(see `#1562`_). Thanks `@kvas-it`_, for the PR.
1227
* Allow passing a custom debugger class (e.g. ``--pdbcls=IPython.core.debugger:Pdb``).
1228
Thanks to `@anntzer`_ for the PR.
1229
+ Changes
1230
* Plugins now benefit from assertion rewriting. Thanks
1231
`@sober7`_, `@nicoddemus`_ and `@flub`_ for the PR.
1232
* Change ``report.outcome`` for ``xpassed`` tests to ``"passed"`` in non-strict
1233
mode and ``"failed"`` in strict mode. Thanks to `@hackebrot`_ for the PR
1234
(`#1795`_) and `@gprasad84`_ for report (`#1546`_).
1235
* Tests marked with ``xfail(strict=False)`` (the default) now appear in
1236
JUnitXML reports as passing tests instead of skipped.
1237
Thanks to `@hackebrot`_ for the PR (`#1795`_).
1238
* Highlight path of the file location in the error report to make it easier to copy/paste.
1239
Thanks `@suzaku`_ for the PR (`#1778`_).
1240
* Fixtures marked with ``@pytest.fixture`` can now use ``yield`` statements exactly like
1241
those marked with the ``@pytest.yield_fixture`` decorator. This change renders
1242
``@pytest.yield_fixture`` deprecated and makes ``@pytest.fixture`` with ``yield`` statements
1243
the preferred way to write teardown code (`#1461`_).
1244
Thanks `@csaftoiu`_ for bringing this to attention and `@nicoddemus`_ for the PR.
1245
* Explicitly passed parametrize ids do not get escaped to ascii (`#1351`_).
1246
Thanks `@ceridwen`_ for the PR.
1247
* Fixtures are now sorted in the error message displayed when an unknown
1248
fixture is declared in a test function.
1249
Thanks `@nicoddemus`_ for the PR.
1250
* ``pytest_terminal_summary`` hook now receives the ``exitstatus``
1251
of the test session as argument. Thanks `@blueyed`_ for the PR (`#1809`_).
1252
* Parametrize ids can accept ``None`` as specific test id, in which case the
1253
automatically generated id for that argument will be used.
1254
Thanks `@palaviv`_ for the complete PR (`#1468`_).
1255
* The parameter to xunit-style setup/teardown methods (``setup_method``,
1256
``setup_module``, etc.) is now optional and may be omitted.
1257
Thanks `@okken`_ for bringing this to attention and `@nicoddemus`_ for the PR.
1258
* Improved automatic id generation selection in case of duplicate ids in
1259
parametrize.
1260
Thanks `@palaviv`_ for the complete PR (`#1474`_).
1261
* Now pytest warnings summary is shown up by default. Added a new flag
1262
``--disable-pytest-warnings`` to explicitly disable the warnings summary (`#1668`_).
1263
* Make ImportError during collection more explicit by reminding
1264
the user to check the name of the test module/package(s) (`#1426`_).
1265
Thanks `@omarkohl`_ for the complete PR (`#1520`_).
1266
* Add ``build/`` and ``dist/`` to the default ``--norecursedirs`` list. Thanks
1267
`@mikofski`_ for the report and `@tomviner`_ for the PR (`#1544`_).
1268
* ``pytest.raises`` in the context manager form accepts a custom
1269
``message`` to raise when no exception occurred.
1270
Thanks `@palaviv`_ for the complete PR (`#1616`_).
1271
* ``conftest.py`` files now benefit from assertion rewriting; previously it
1272
was only available for test modules. Thanks `@flub`_, `@sober7`_ and
1273
`@nicoddemus`_ for the PR (`#1619`_).
1274
* Text documents without any doctests no longer appear as "skipped".
1275
Thanks `@graingert`_ for reporting and providing a full PR (`#1580`_).
1276
* Ensure that a module within a namespace package can be found when it
1277
is specified on the command line together with the ``--pyargs``
1278
option. Thanks to `@taschini`_ for the PR (`#1597`_).
1279
* Always include full assertion explanation during assertion rewriting. The previous behaviour was hiding
1280
sub-expressions that happened to be ``False``, assuming this was redundant information.
1281
Thanks `@bagerard`_ for reporting (`#1503`_). Thanks to `@davehunt`_ and
1282
`@tomviner`_ for the PR.
1283
* ``OptionGroup.addoption()`` now checks if option names were already
1284
added before, to make it easier to track down issues like `#1618`_.
1285
Before, you only got exceptions later from ``argparse`` library,
1286
giving no clue about the actual reason for double-added options.
1287
* ``yield``-based tests are considered deprecated and will be removed in pytest-4.0.
1288
Thanks `@nicoddemus`_ for the PR.
1289
* ``[pytest]`` sections in ``setup.cfg`` files should now be named ``[tool:pytest]``
1290
to avoid conflicts with other distutils commands (see `#567`_). ``[pytest]`` sections in
1291
``pytest.ini`` or ``tox.ini`` files are supported and unchanged.
1292
Thanks `@nicoddemus`_ for the PR.
1293
* Using ``pytest_funcarg__`` prefix to declare fixtures is considered deprecated and will be
1294
removed in pytest-4.0 (`#1684`_).
1295
Thanks `@nicoddemus`_ for the PR.
1296
* Passing a command-line string to ``pytest.main()`` is considered deprecated and scheduled
1297
for removal in pytest-4.0. It is recommended to pass a list of arguments instead (`#1723`_).
1298
* Rename ``getfuncargvalue`` to ``getfixturevalue``. ``getfuncargvalue`` is
1299
still present but is now considered deprecated. Thanks to `@RedBeardCode`_ and `@tomviner`_
1300
for the PR (`#1626`_).
1301
* ``optparse`` type usage now triggers DeprecationWarnings (`#1740`_).
1302
* ``optparse`` backward compatibility supports float/complex types (`#457`_).
1303
* Refined logic for determining the ``rootdir``, considering only valid
1304
paths which fixes a number of issues: `#1594`_, `#1435`_ and `#1471`_.
1305
Updated the documentation according to current behavior. Thanks to
1306
`@blueyed`_, `@davehunt`_ and `@matthiasha`_ for the PR.
1307
* Always include full assertion explanation. The previous behaviour was hiding
1308
sub-expressions that happened to be False, assuming this was redundant information.
1309
Thanks `@bagerard`_ for reporting (`#1503`_). Thanks to `@davehunt`_ and
1310
`@tomviner`_ for PR.
1311
* Better message in case of not using parametrized variable (see `#1539`_).
1312
Thanks to `@tramwaj29`_ for the PR.
1313
* Updated docstrings with a more uniform style.
1314
* Add stderr write for ``pytest.exit(msg)`` during startup. Previously the message was never shown.
1315
Thanks `@BeyondEvil`_ for reporting `#1210`_. Thanks to `@JonathonSonesen`_ and
1316
`@tomviner`_ for the PR.
1317
* No longer display the incorrect test deselection reason (`#1372`_).
1318
Thanks `@ronnypfannschmidt`_ for the PR.
1319
* The ``--resultlog`` command line option has been deprecated: it is little used
1320
and there are more modern and better alternatives (see `#830`_).
1321
Thanks `@nicoddemus`_ for the PR.
1322
* Improve error message with fixture lookup errors: add an 'E' to the first
1323
line and '>' to the rest. Fixes `#717`_. Thanks `@blueyed`_ for reporting and
1324
a PR, `@eolo999`_ for the initial PR and `@tomviner`_ for his guidance during
1325
EuroPython2016 sprint.
1326
+ Bug Fixes
1327
* Parametrize now correctly handles duplicated test ids.
1328
* Fix internal error issue when the ``method`` argument is missing for
1329
``teardown_method()`` (`#1605`_).
1330
* Fix exception visualization in case the current working directory (CWD) gets
1331
deleted during testing (`#1235`_). Thanks `@bukzor`_ for reporting. PR by
1332
`@marscher`_.
1333
* Improve test output for logical expression with brackets (`#925`_).
1334
Thanks `@DRMacIver`_ for reporting and `@RedBeardCode`_ for the PR.
1335
* Create correct diff for strings ending with newlines (`#1553`_).
1336
Thanks `@Vogtinator`_ for reporting and `@RedBeardCode`_ and
1337
`@tomviner`_ for the PR.
1338
* ``ConftestImportFailure`` now shows the traceback making it easier to
1339
identify bugs in ``conftest.py`` files (`#1516`_). Thanks `@txomon`_ for
1340
the PR.
1341
* Text documents without any doctests no longer appear as "skipped".
1342
Thanks `@graingert`_ for reporting and providing a full PR (`#1580`_).
1343
* Fixed collection of classes with custom ``__new__`` method.
1344
Fixes `#1579`_. Thanks to `@Stranger6667`_ for the PR.
1345
* Fixed scope overriding inside metafunc.parametrize (`#634`_).
1346
Thanks to `@Stranger6667`_ for the PR.
1347
* Fixed the total tests tally in junit xml output (`#1798`_).
1348
Thanks to `@cryporchild`_ for the PR.
1349
* Fixed off-by-one error with lines from ``request.node.warn``.
1350
Thanks to `@blueyed`_ for the PR.
1351
- update to version 2.9.2:
1352
* fix #510: skip tests where one parameterize dimension was empty
1353
thanks Alex Stapleton for the Report and @RonnyPfannschmidt for
1354
the PR
1355
* Fix Xfail does not work with condition keyword argument. Thanks
1356
@astraw38 for reporting the issue (#1496) and @tomviner for PR the
1357
(#1524).
1358
* Fix win32 path issue when puttinging custom config file with
1359
absolute path in pytest.main("-c your_absolute_path").
1360
* Fix maximum recursion depth detection when raised error class is
1361
not aware of unicode/encoded bytes. Thanks @prusse-martin for the
1362
PR (#1506).
1363
* Fix pytest.mark.skip mark when used in strict mode. Thanks
1364
@pquentin for the PR and @RonnyPfannschmidt for showing how to fix
1365
the bug.
1366
* Minor improvements and fixes to the documentation. Thanks
1367
@omarkohl for the PR.
1368
* Fix --fixtures to show all fixture definitions as opposed to just
1369
one per fixture name. Thanks to @hackebrot for the PR.
1370
- update to version 2.9.1:
1371
* Improve error message when a plugin fails to load. Thanks
1372
@nicoddemus for the PR.
1373
* Fix (#1178): pytest.fail with non-ascii characters raises an
1374
internal pytest error. Thanks @nicoddemus for the PR.
1375
* Fix (#469): junit parses report.nodeid incorrectly, when params
1376
IDs contain ::. Thanks @tomviner for the PR (#1431).
1377
* Fix (#578): SyntaxErrors containing non-ascii lines at the point
1378
of failure generated an internal py.test error. Thanks @asottile
1379
for the report and @nicoddemus for the PR.
1380
* Fix (#1437): When passing in a bytestring regex pattern to
1381
parameterize attempt to decode it as utf-8 ignoring errors.
1382
* Fix (#649): parametrized test nodes cannot be specified to run on
1383
the command line.
1384
- update to version 2.9.0:
1385
* New Features
1386
+ New pytest.mark.skip mark, which unconditionally skips marked
1387
tests. Thanks @MichaelAquilina for the complete PR (#1040).
1388
+ --doctest-glob may now be passed multiple times in the
1389
command-line. Thanks @jab and @nicoddemus for the PR.
1390
+ New -rp and -rP reporting options give the summary and full
1391
output of passing tests, respectively. Thanks to @codewarrior0 for
1392
the PR.
1393
+ pytest.mark.xfail now has a strict option which makes XPASS
1394
tests to fail the test suite, defaulting to False. There’s also a
1395
xfail_strict ini option that can be used to configure it
1396
project-wise. Thanks @rabbbit for the request and @nicoddemus for
1397
the PR (#1355).
1398
+ Parser.addini now supports options of type bool. Thanks
1399
@nicoddemus for the PR.
1400
+ New ALLOW_BYTES doctest option strips b prefixes from byte
1401
strings in doctest output (similar to ALLOW_UNICODE). Thanks
1402
@jaraco for the request and @nicoddemus for the PR (#1287).
1403
+ give a hint on KeyboardInterrupt to use the –fulltrace option to
1404
show the errors, this fixes #1366. Thanks to @hpk42 for the report
1405
and @RonnyPfannschmidt for the PR.
1406
+ catch IndexError exceptions when getting exception source
1407
location. This fixes pytest internal error for dynamically
1408
generated code (fixtures and tests) where source lines are fake by
1409
intention
1410
* Changes
1411
+ Important: py.code has been merged into the pytest repository as
1412
pytest._code. This decision was made because py.code had very few
1413
uses outside pytest and the fact that it was in a different
1414
repository made it difficult to fix bugs on its code in a timely
1415
manner. The team hopes with this to be able to better refactor out
1416
and improve that code. This change shouldn’t affect users, but it
1417
is useful to let users aware if they encounter any strange
1418
behavior.
1419
+ Keep in mind that the code for pytest._code is private and
1420
experimental, so you definitely should not import it explicitly!
1421
+ Please note that the original py.code is still available in
1422
pylib.
1423
+ pytest_enter_pdb now optionally receives the pytest config
1424
object. Thanks @nicoddemus for the PR.
1425
+ Removed code and documentation for Python 2.5 or lower versions,
1426
including removal of the obsolete _pytest.assertion.oldinterpret
1427
module. Thanks @nicoddemus for the PR (#1226).
1428
+ Comparisons now always show up in full when CI or BUILD_NUMBER
1429
is found in the environment, even when -vv isn’t used. Thanks
1430
@The-Compiler for the PR.
1431
+ --lf and --ff now support long names: --last-failed and
1432
--failed-first respectively. Thanks @MichaelAquilina for the PR.
1433
+ Added expected exceptions to pytest.raises fail message
1434
+ Collection only displays progress (“collecting X items”) when in
1435
a terminal. This avoids cluttering the output when using
1436
--color=yes to obtain colors in CI integrations systems (#1397).
1437
* Bug Fixes
1438
+ The -s and -c options should now work under xdist;
1439
Config.fromdictargs now represents its input much more
1440
faithfully. Thanks to @bukzor for the complete PR (#680).
1441
+ Fix (#1290): support Python 3.5’s @ operator in assertion
1442
rewriting. Thanks @Shinkenjoe for report with test case and
1443
@tomviner for the PR.
1444
+ Fix formatting utf-8 explanation messages (#1379). Thanks @biern
1445
for the PR.
1446
+ Fix traceback style docs to describe all of the available
1447
options (auto/long/short/line/native/no), with auto being the
1448
default since v2.6. Thanks @hackebrot for the PR.
1449
+ Fix (#1422): junit record_xml_property doesn’t allow multiple
1450
records with same name.
1451
- update to version 2.8.7:
1452
* fix #1338: use predictable object resolution for monkeypatch
1453
- changes from version 2.8.6:
1454
* fix #1259: allow for double nodeids in junitxml, this was a
1455
regression failing plugins combinations like pytest-pep8 +
1456
pytest-flakes
1457
* Workaround for exception that occurs in pyreadline when using
1458
--pdb with standard I/O capture enabled. Thanks Erik M. Bray for
1459
the PR.
1460
* fix #900: Better error message in case the target of a monkeypatch
1461
call raises an ImportError.
1462
* fix #1292: monkeypatch calls (setattr, setenv, etc.) are now
1463
O(1). Thanks David R. MacIver for the report and Bruno Oliveira
1464
for the PR.
1465
* fix #1223: captured stdout and stderr are now properly displayed
1466
before entering pdb when --pdb is used instead of being thrown
1467
away. Thanks Cal Leeming for the PR.
1468
* fix #1305: pytest warnings emitted during pytest_terminal_summary
1469
are now properly displayed. Thanks Ionel Maries Cristian for the
1470
report and Bruno Oliveira for the PR.
1471
* fix #628: fixed internal UnicodeDecodeError when doctests contain
1472
unicode. Thanks Jason R. Coombs for the report and Bruno Oliveira
1473
for the PR.
1474
* fix #1334: Add captured stdout to jUnit XML report on setup
1475
error. Thanks Georgy Dyuldin for the PR.
1476
- Update to version 2.8.5
1477
* fix #1243: fixed issue where class attributes injected during
1478
collection could break pytest.
1479
fix #1074: precompute junitxml chunks instead of storing the
1480
whole tree in objects
1481
fix #1238: fix pytest.deprecated_call() receiving multiple
1482
arguments (Regression introduced in 2.8.4).
1483
- update to version 2.8.4:
1484
* fix #1190: deprecated_call() now works when the deprecated
1485
function has been already called by another test in the same
1486
module. Thanks Mikhail Chernykh for the report and Bruno Oliveira
1487
for the PR.
1488
* fix #1198: --pastebin option now works on Python 3. Thanks Mehdy
1489
Khoshnoody for the PR.
1490
* fix #1219: --pastebin now works correctly when captured output
1491
contains non-ascii characters. Thanks Bruno Oliveira for the PR.
1492
* fix #1204: another error when collecting with a nasty
1493
__getattr__(). Thanks Florian Bruhin for the PR.
1494
* fix the summary printed when no tests did run. Thanks Florian
1495
Bruhin for the PR.
1496
* a number of documentation modernizations wrt good
1497
practices. Thanks Bruno Oliveira for the PR.
1498
- update to version 2.8.3:
1499
* fix #1169: add __name__ attribute to testcases in TestCaseFunction
1500
to support the @unittest.skip decorator on functions and methods.
1501
Thanks Lee Kamentsky for the PR.
1502
* fix #1035: collecting tests if test module level obj has
1503
__getattr__(). Thanks Suor for the report and Bruno Oliveira /
1504
Tom Viner for the PR.
1505
* fix #331: don't collect tests if their failure cannot be reported
1506
correctly e.g. they are a callable instance of a class.
1507
* fix #1133: fixed internal error when filtering tracebacks where
1508
one entry belongs to a file which is no longer available. Thanks
1509
Bruno Oliveira for the PR.
1510
* enhancement made to highlight in red the name of the failing tests
1511
so they stand out in the output. Thanks Gabriel Reis for the PR.
1512
* add more talks to the documentation
1513
* extend documentation on the --ignore cli option
1514
* use pytest-runner for setuptools integration
1515
* minor fixes for interaction with OS X El Capitan system integrity
1516
protection (thanks Florian)
1517
- Update to 2.8.2:
1518
- fix #1085: proper handling of encoding errors when passing encoded byte
1519
strings to pytest.parametrize in Python 2.
1520
Thanks Themanwithoutaplan for the report and Bruno Oliveira for the PR.
1521
- fix #1087: handling SystemError when passing empty byte strings to
1522
pytest.parametrize in Python 3.
1523
Thanks Paul Kehrer for the report and Bruno Oliveira for the PR.
1524
- fix #995: fixed internal error when filtering tracebacks where one entry
1525
was generated by an exec() statement.
1526
Thanks Daniel Hahler, Ashley C Straw, Philippe Gauthier and Pavel Savchenko
1527
for contributing and Bruno Oliveira for the PR.
1528
- Update to 2.8.1
1529
- fix #1034: Add missing nodeid on pytest_logwarning call in
1530
addhook. Thanks Simon Gomizelj for the PR.
1531
- 'deprecated_call' is now only satisfied with a DeprecationWarning or
1532
PendingDeprecationWarning. Before 2.8.0, it accepted any warning, and 2.8.0
1533
made it accept only DeprecationWarning (but not PendingDeprecationWarning).
1534
Thanks Alex Gaynor for the issue and Eric Hunsberger for the PR.
1535
- fix issue #1073: avoid calling __getattr__ on potential plugin objects.
1536
This fixes an incompatibility with pytest-django. Thanks Andreas Pelme,
1537
Bruno Oliveira and Ronny Pfannschmidt for contributing and Holger Krekel
1538
for the fix.
1539
- Fix issue #704: handle versionconflict during plugin loading more
1540
gracefully. Thanks Bruno Oliveira for the PR.
1541
- Fix issue #1064: ""--junitxml" regression when used with the
1542
"pytest-xdist" plugin, with test reports being assigned to the wrong tests.
1543
Thanks Daniel Grunwald for the report and Bruno Oliveira for the PR.
1544
- (experimental) adapt more SEMVER style versioning and change meaning of
1545
master branch in git repo: "master" branch now keeps the bugfixes, changes
1546
aimed for micro releases. "features" branch will only be be released
1547
with minor or major pytest releases.
1548
- Fix issue #766 by removing documentation references to distutils.
1549
Thanks Russel Winder.
1550
- Fix issue #1030: now byte-strings are escaped to produce item node ids
1551
to make them always serializable.
1552
Thanks Andy Freeland for the report and Bruno Oliveira for the PR.
1553
- Python 2: if unicode parametrized values are convertible to ascii, their
1554
ascii representation is used for the node id.
1555
- Fix issue #411: Add __eq__ method to assertion comparison example.
1556
Thanks Ben Webb.
1557
- fix issue 877: properly handle assertion explanations with non-ascii repr
1558
Thanks Mathieu Agopian for the report and Ronny Pfannschmidt for the PR.
1559
- fix issue 1029: transform errors when writing cache values into pytest-warnings
1560
- Update to 2.8.0
1561
- new ``--lf`` and ``-ff`` options to run only the last failing tests or
1562
"failing tests first" from the last run. This functionality is provided
1563
through porting the formerly external pytest-cache plugin into pytest core.
1564
BACKWARD INCOMPAT: if you used pytest-cache's functionality to persist
1565
data between test runs be aware that we don't serialize sets anymore.
1566
Thanks Ronny Pfannschmidt for most of the merging work.
1567
- "-r" option now accepts "a" to include all possible reports, similar
1568
to passing "fEsxXw" explicitly (isse960).
1569
Thanks Abhijeet Kasurde for the PR.
1570
- avoid python3.5 deprecation warnings by introducing version
1571
specific inspection helpers, thanks Michael Droettboom.
1572
- fix issue562: @nose.tools.istest now fully respected.
1573
- fix issue934: when string comparison fails and a diff is too large to display
1574
without passing -vv, still show a few lines of the diff.
1575
Thanks Florian Bruhin for the report and Bruno Oliveira for the PR.
1576
- fix issue736: Fix a bug where fixture params would be discarded when combined
1577
with parametrization markers.
1578
Thanks to Markus Unterwaditzer for the PR.
1579
- fix issue710: introduce ALLOW_UNICODE doctest option: when enabled, the
1580
``u`` prefix is stripped from unicode strings in expected doctest output. This
1581
allows doctests which use unicode to run in Python 2 and 3 unchanged.
1582
Thanks Jason R. Coombs for the report and Bruno Oliveira for the PR.
1583
- parametrize now also generates meaningful test IDs for enum, regex and class
1584
objects (as opposed to class instances).
1585
Thanks to Florian Bruhin for the PR.
1586
- Add 'warns' to assert that warnings are thrown (like 'raises').
1587
Thanks to Eric Hunsberger for the PR.
1588
- Fix issue683: Do not apply an already applied mark. Thanks ojake for the PR.
1589
- Deal with capturing failures better so fewer exceptions get lost to
1590
/dev/null. Thanks David Szotten for the PR.
1591
- fix issue730: deprecate and warn about the --genscript option.
1592
Thanks Ronny Pfannschmidt for the report and Christian Pommranz for the PR.
1593
- fix issue751: multiple parametrize with ids bug if it parametrizes class with
1594
two or more test methods. Thanks Sergey Chipiga for reporting and Jan
1595
Bednarik for PR.
1596
- fix issue82: avoid loading conftest files from setup.cfg/pytest.ini/tox.ini
1597
files and upwards by default (--confcutdir can still be set to override this).
1598
Thanks Bruno Oliveira for the PR.
1599
- fix issue768: docstrings found in python modules were not setting up session
1600
fixtures. Thanks Jason R. Coombs for reporting and Bruno Oliveira for the PR.
1601
- added `tmpdir_factory`, a session-scoped fixture that can be used to create
1602
directories under the base temporary directory. Previously this object was
1603
installed as a `_tmpdirhandler` attribute of the `config` object, but now it
1604
is part of the official API and using `config._tmpdirhandler` is
1605
deprecated.
1606
Thanks Bruno Oliveira for the PR.
1607
- fix issue808: pytest's internal assertion rewrite hook now implements the
1608
optional PEP302 get_data API so tests can access data files next to them.
1609
Thanks xmo-odoo for request and example and Bruno Oliveira for
1610
the PR.
1611
- rootdir and inifile are now displayed during usage errors to help
1612
users diagnose problems such as unexpected ini files which add
1613
unknown options being picked up by pytest. Thanks to Pavel Savchenko for
1614
bringing the problem to attention in #821 and Bruno Oliveira for the PR.
1615
- Summary bar now is colored yellow for warning
1616
situations such as: all tests either were skipped or xpass/xfailed,
1617
or no tests were run at all (this is a partial fix for issue500).
1618
- fix issue812: pytest now exits with status code 5 in situations where no
1619
tests were run at all, such as the directory given in the command line does
1620
not contain any tests or as result of a command line option filters
1621
all out all tests (-k for example).
1622
Thanks Eric Siegerman (issue812) and Bruno Oliveira for the PR.
1623
- Summary bar now is colored yellow for warning
1624
situations such as: all tests either were skipped or xpass/xfailed,
1625
or no tests were run at all (related to issue500).
1626
Thanks Eric Siegerman.
1627
- New `testpaths` ini option: list of directories to search for tests
1628
when executing pytest from the root directory. This can be used
1629
to speed up test collection when a project has well specified directories
1630
for tests, being usually more practical than configuring norecursedirs for
1631
all directories that do not contain tests.
1632
Thanks to Adrian for idea (#694) and Bruno Oliveira for the PR.
1633
- fix issue713: JUnit XML reports for doctest failures.
1634
Thanks Punyashloka Biswal.
1635
- fix issue970: internal pytest warnings now appear as "pytest-warnings" in
1636
the terminal instead of "warnings", so it is clear for users that those
1637
warnings are from pytest and not from the builtin "warnings" module.
1638
Thanks Bruno Oliveira.
1639
- Include setup and teardown in junitxml test durations.
1640
Thanks Janne Vanhala.
1641
- fix issue735: assertion failures on debug versions of Python 3.4+
1642
- new option ``--import-mode`` to allow to change test module importing
1643
behaviour to append to sys.path instead of prepending. This better allows
1644
to run test modules against installated versions of a package even if the
1645
package under test has the same import root. In this example::
1646
testing/__init__.py
1647
testing/test_pkg_under_test.py
1648
pkg_under_test/
1649
the tests will run against the installed version
1650
of pkg_under_test when ``--import-mode=append`` is used whereas
1651
by default they would always pick up the local version. Thanks Holger Krekel.
1652
- pytester: add method ``TmpTestdir.delete_loaded_modules()``, and call it
1653
from ``inline_run()`` to allow temporary modules to be reloaded.
1654
Thanks Eduardo Schettino.
1655
- internally refactor pluginmanager API and code so that there
1656
is a clear distinction between a pytest-agnostic rather simple
1657
pluginmanager and the PytestPluginManager which adds a lot of
1658
behaviour, among it handling of the local conftest files.
1659
In terms of documented methods this is a backward compatible
1660
change but it might still break 3rd party plugins which relied on
1661
details like especially the pluginmanager.add_shutdown() API.
1662
Thanks Holger Krekel.
1663
- pluginmanagement: introduce ``pytest.hookimpl`` and
1664
``pytest.hookspec`` decorators for setting impl/spec
1665
specific parameters. This substitutes the previous
1666
now deprecated use of ``pytest.mark`` which is meant to
1667
contain markers for test functions only.
1668
- write/refine docs for "writing plugins" which now have their
1669
own page and are separate from the "using/installing plugins`` page.
1670
- fix issue732: properly unregister plugins from any hook calling
1671
sites allowing to have temporary plugins during test execution.
1672
- deprecate and warn about ``__multicall__`` argument in hook
1673
implementations. Use the ``hookwrapper`` mechanism instead already
1674
introduced with pytest-2.7.
1675
- speed up pytest's own test suite considerably by using inprocess
1676
tests by default (testrun can be modified with --runpytest=subprocess
1677
to create subprocesses in many places instead). The main
1678
APIs to run pytest in a test is "runpytest()" or "runpytest_subprocess"
1679
and "runpytest_inprocess" if you need a particular way of running
1680
the test. In all cases you get back a RunResult but the inprocess
1681
one will also have a "reprec" attribute with the recorded events/reports.
1682
- fix monkeypatch.setattr("x.y", raising=False) to actually not raise
1683
if "y" is not a pre-existing attribute. Thanks Florian Bruhin.
1684
- fix issue741: make running output from testdir.run copy/pasteable
1685
Thanks Bruno Oliveira.
1686
- add a new ``--noconftest`` argument which ignores all ``conftest.py`` files.
1687
- add ``file`` and ``line`` attributes to JUnit-XML output.
1688
- fix issue890: changed extension of all documentation files from ``txt`` to
1689
``rst``. Thanks to Abhijeet for the PR.
1690
- fix issue714: add ability to apply indirect=True parameter on particular argnames.
1691
Thanks Elizaveta239.
1692
- fix issue890: changed extension of all documentation files from ``txt`` to
1693
``rst``. Thanks to Abhijeet for the PR.
1694
- fix issue957: "# doctest: SKIP" option will now register doctests as SKIPPED
1695
rather than PASSED.
1696
Thanks Thomas Grainger for the report and Bruno Oliveira for the PR.
1697
- issue951: add new record_xml_property fixture, that supports logging
1698
additional information on xml output. Thanks David Diaz for the PR.
1699
- issue949: paths after normal options (for example `-s`, `-v`, etc) are now
1700
properly used to discover `rootdir` and `ini` files.
1701
Thanks Peter Lauri for the report and Bruno Oliveira for the PR.
1702
- Update to 2.7.3 (compared to 2.7.2)
1703
- Allow 'dev', 'rc', or other non-integer version strings in `importorskip`.
1704
Thanks to Eric Hunsberger for the PR.
1705
- fix issue856: consider --color parameter in all outputs (for example
1706
--fixtures). Thanks Barney Gale for the report and Bruno Oliveira for the PR.
1707
- fix issue855: passing str objects as `plugins` argument to pytest.main
1708
is now interpreted as a module name to be imported and registered as a
1709
plugin, instead of silently having no effect.
1710
Thanks xmo-odoo for the report and Bruno Oliveira for the PR.
1711
- fix issue744: fix for ast.Call changes in Python 3.5+. Thanks
1712
Guido van Rossum, Matthias Bussonnier, Stefan Zimmermann and
1713
Thomas Kluyver.
1714
- fix issue842: applying markers in classes no longer propagate this markers
1715
to superclasses which also have markers.
1716
Thanks xmo-odoo for the report and Bruno Oliveira for the PR.
1717
- preserve warning functions after call to pytest.deprecated_call. Thanks
1718
Pieter Mulder for PR.
1719
- fix issue854: autouse yield_fixtures defined as class members of
1720
unittest.TestCase subclasses now work as expected.
1721
Thannks xmo-odoo for the report and Bruno Oliveira for the PR.
1722
- fix issue833: --fixtures now shows all fixtures of collected test files, instead of just the
1723
fixtures declared on the first one.
1724
Thanks Florian Bruhin for reporting and Bruno Oliveira for the PR.
1725
- fix issue863: skipped tests now report the correct reason when a skip/xfail
1726
condition is met when using multiple markers.
1727
Thanks Raphael Pierzina for reporting and Bruno Oliveira for the PR.
1728
- optimized tmpdir fixture initialization, which should make test sessions
1729
faster (specially when using pytest-xdist). The only visible effect
1730
is that now pytest uses a subdirectory in the $TEMP directory for all
1731
directories created by this fixture (defaults to $TEMP/pytest-$USER).
1732
Thanks Bruno Oliveira for the PR.
1733
- Update to 2.7.2
1734
- fix issue767: pytest.raises value attribute does not contain the exception
1735
instance on Python 2.6. Thanks Eric Siegerman for providing the test
1736
case and Bruno Oliveira for PR.
1737
- Automatically create directory for junitxml and results log.
1738
Thanks Aron Curzon.
1739
- fix issue713: JUnit XML reports for doctest failures.
1740
Thanks Punyashloka Biswal.
1741
- fix issue735: assertion failures on debug versions of Python 3.4+
1742
Thanks Benjamin Peterson.
1743
- fix issue114: skipif marker reports to internal skipping plugin;
1744
Thanks Floris Bruynooghe for reporting and Bruno Oliveira for the PR.
1745
- fix issue748: unittest.SkipTest reports to internal pytest unittest plugin.
1746
Thanks Thomas De Schampheleire for reporting and Bruno Oliveira for the PR.
1747
- fix issue718: failed to create representation of sets containing unsortable
1748
elements in python 2. Thanks Edison Gustavo Muenz.
1749
- fix issue756, fix issue752 (and similar issues): depend on py-1.4.29
1750
which has a refined algorithm for traceback generation.
1751
- Move %check to -doc subpackage to avoid dependency loop
1752
with new python3-hypothesis test dependency.
1753
1754
-------------------------------------------------------------------
1755
Wed Jul 29 13:01:56 UTC 2015 - toddrme2178@gmail.com
1756
1757
- Make tests conditional to avoid dependency loop.
1758
1759
-------------------------------------------------------------------
1760
Mon Jul 27 09:29:06 UTC 2015 - seife+obs@b1-systems.com
1761
1762
- revert update-alternatives change, causes OBS trouble
1763
1764
-------------------------------------------------------------------
1765
Fri Jul 24 06:37:21 UTC 2015 - seife+obs@b1-systems.com
1766
1767
- Change update-alternatives requirement to absolute path to fix
1768
non-SUSE distributions (RHEL7)
1769
1770
-------------------------------------------------------------------
1771
Mon Jul 6 17:59:24 UTC 2015 - rjschwei@suse.com
1772
1773
- Add python-xml as build dependency to avoid test failure with the
1774
Python version shipped in SLE 12
1775
1776
-------------------------------------------------------------------
1777
Sun May 24 10:57:07 UTC 2015 - toddrme2178@gmail.com
1778
1779
- Split documentation into separate package to avoid build loop
1780
1781
-------------------------------------------------------------------
1782
Thu May 21 13:44:26 UTC 2015 - toddrme2178@gmail.com
1783
1784
- It doesn't need Twisted, and the dependency causes a build cycle.
1785
So it is removed from BuildRequires
1786
1787
-------------------------------------------------------------------
1788
Wed May 20 14:03:37 UTC 2015 - toddrme2178@gmail.com
1789
1790
- Update to version 2.7.1:
1791
* fix issue731: do not get confused by the braces which may be
1792
present and unbalanced in an object's repr while collapsing
1793
False explanations. Thanks Carl Meyer for the report and test
1794
case.
1795
* fix issue553: properly handling inspect.getsourcelines
1796
failures in FixtureLookupError which would lead to to an
1797
internal error, obfuscating the original problem. Thanks
1798
talljosh for initial diagnose/patch and Bruno Oliveira for
1799
final patch.
1800
* fix issue660: properly report scope-mismatch-access errors
1801
independently from ordering of fixture arguments. Also
1802
avoid the pytest internal traceback which does not provide
1803
information to the user. Thanks Holger Krekel.
1804
* streamlined and documented release process. Also all
1805
versions (in setup.py and documentation generation) are now
1806
read from _pytest/__init__.py. Thanks Holger Krekel.
1807
* fixed docs to remove the notion that yield-fixtures are
1808
experimental. They are here to stay :) Thanks Bruno Oliveira.
1809
* Support building wheels by using environment markers for the
1810
requirements. Thanks Ionel Maries Cristian.
1811
* fixed regression to 2.6.4 which surfaced e.g. in lost stdout
1812
capture printing when tests raised SystemExit. Thanks
1813
Holger Krekel.
1814
* reintroduced _pytest fixture of the pytester plugin which
1815
is used at least by pytest-xdist.
1816
1817
-------------------------------------------------------------------
1818
Sun Apr 5 05:51:50 UTC 2015 - tbechtold@suse.com
1819
1820
- update to 2.7.0:
1821
- fix issue435: make reload() work when assert rewriting is active.
1822
Thanks Daniel Hahler.
1823
- fix issue616: conftest.py files and their contained fixutres are now
1824
properly considered for visibility, independently from the exact
1825
current working directory and test arguments that are used.
1826
Many thanks to Eric Siegerman and his PR235 which contains
1827
systematic tests for conftest visibility and now passes.
1828
This change also introduces the concept of a ``rootdir`` which
1829
is printed as a new pytest header and documented in the pytest
1830
customize web page.
1831
- change reporting of "diverted" tests, i.e. tests that are collected
1832
in one file but actually come from another (e.g. when tests in a test class
1833
come from a base class in a different file). We now show the nodeid
1834
and indicate via a postfix the other file.
1835
- add ability to set command line options by environment
1836
variable PYTEST_ADDOPTS.
1837
- added documentation on the new pytest-dev teams on bitbucket and
1838
github. See https://pytest.org/latest/contributing.html .
1839
Thanks to Anatoly for pushing and initial work on this.
1840
- fix issue650: new option ``--docttest-ignore-import-errors`` which
1841
will turn import errors in doctests into skips. Thanks Charles Cloud
1842
for the complete PR.
1843
- fix issue655: work around different ways that cause python2/3
1844
to leak sys.exc_info into fixtures/tests causing failures in 3rd party code
1845
- fix issue615: assertion re-writing did not correctly escape % signs
1846
when formatting boolean operations, which tripped over mixing
1847
booleans with modulo operators. Thanks to Tom Viner for the report,
1848
triaging and fix.
1849
- implement issue351: add ability to specify parametrize ids as a callable
1850
to generate custom test ids. Thanks Brianna Laugher for the idea and
1851
implementation.
1852
- introduce and document new hookwrapper mechanism useful for plugins
1853
which want to wrap the execution of certain hooks for their purposes.
1854
This supersedes the undocumented ``__multicall__`` protocol which
1855
pytest itself and some external plugins use. Note that pytest-2.8
1856
is scheduled to drop supporting the old ``__multicall__``
1857
and only support the hookwrapper protocol.
1858
- majorly speed up invocation of plugin hooks
1859
- use hookwrapper mechanism in builtin pytest plugins.
1860
- add a doctest ini option for doctest flags, thanks Holger Peters.
1861
- add note to docs that if you want to mark a parameter and the
1862
parameter is a callable, you also need to pass in a reason to disambiguate
1863
it from the "decorator" case. Thanks Tom Viner.
1864
- "python_classes" and "python_functions" options now support glob-patterns
1865
for test discovery, as discussed in issue600. Thanks Ldiary Translations.
1866
- allow to override parametrized fixtures with non-parametrized ones and
1867
vice ver sa (bubenkoff).
1868
- fix issue463: raise specific error for 'parameterize' misspelling
1869
(pfctdayelise ).
1870
- On failure, the ``sys.last_value``, ``sys.last_type`` and
1871
``sys.last_traceback`` are set, so that a user can inspect the error
1872
via postmortem debugging (almarklein).
1873
- Bump Requires/BuildRequires for python-py
1874
1875
-------------------------------------------------------------------
1876
Wed Mar 25 14:00:17 UTC 2015 - mcihar@suse.cz
1877
1878
- Add optional dependencies for testsuite as BuildRequires.
1879
1880
-------------------------------------------------------------------
1881
Wed Mar 25 13:48:01 UTC 2015 - mcihar@suse.cz
1882
1883
- Update to 2.6.4:
1884
- Improve assertion failure reporting on iterables, by using ndiff and pprint.
1885
- removed outdated japanese docs from source tree.
1886
- docs for "pytest_addhooks" hook. Thanks Bruno Oliveira.
1887
- updated plugin index docs. Thanks Bruno Oliveira.
1888
- fix issue557: with "-k" we only allow the old style "-" for negation
1889
at the beginning of strings and even that is deprecated. Use "not" instead.
1890
This should allow to pick parametrized tests where "-" appeared in the parameter.
1891
- fix issue604: Escape % character in the assertion message.
1892
- fix issue620: add explanation in the --genscript target about what
1893
the binary blob means. Thanks Dinu Gherman.
1894
- fix issue614: fixed pastebin support.
1895
1896
-------------------------------------------------------------------
1897
Sat Nov 08 20:29:00 UTC 2014 - Led <ledest@gmail.com>
1898
1899
- fix bashism in pre script
1900
1901
-------------------------------------------------------------------
1902
Sun Oct 5 15:15:06 UTC 2014 - toms@opensuse.org
1903
1904
- Update to 2.6.3
1905
- No longer show line numbers in the –verbose output, the output
1906
is now purely the nodeid. The line number is still shown in
1907
failure reports. Thanks Floris Bruynooghe.
1908
- fix issue437 where assertion rewriting could cause pytest-xdist
1909
slaves to collect different tests.
1910
Thanks Bruno Oliveira.
1911
- fix issue555: add “errors” attribute to capture-streams to
1912
satisfy some distutils and possibly other code accessing sys.stdout.errors.
1913
- fix issue547 capsys/capfd also work when output capturing (“-s”)
1914
is disabled.
1915
- address issue170: allow pytest.mark.xfail(...) to specify expected
1916
exceptions via an optional “raises=EXC” argument where EXC can be
1917
a single exception or a tuple of exception classes.
1918
Thanks David Mohr for the complete PR.
1919
- fix integration of pytest with unittest.mock.patch decorator when
1920
it uses the “new” argument.
1921
Thanks Nicolas Delaby for test and PR.
1922
- fix issue with detecting conftest files if the arguments contain
1923
”::” node id specifications (copy pasted from “-v” output)
1924
- fix issue544 by only removing “@NUM” at the end of ”::” separated
1925
parts and if the part has an ”.py” extension don’t use py.std
1926
import helper, rather import things directly.
1927
Thanks Bruno Oliveira.
1928
1929
See for other releases: http://pytest.org/latest/changelog.html
1930
1931
1932
-------------------------------------------------------------------
1933
Wed Jul 30 07:38:02 UTC 2014 - toddrme2178@gmail.com
1934
1935
- Update to 2.6.0
1936
- Cache exceptions from fixtures according to their scope (issue 467).
1937
- fix issue537: Avoid importing old assertion reinterpretation code by default.
1938
- fix issue364: shorten and enhance tracebacks representation by default.
1939
The new "--tb=auto" option (default) will only display long tracebacks
1940
for the first and last entry. You can get the old behaviour of printing
1941
all entries as long entries with "--tb=long". Also short entries by
1942
default are now printed very similarly to "--tb=native" ones.
1943
- fix issue514: teach assertion reinterpretation about private class attributes
1944
- change -v output to include full node IDs of tests. Users can copy
1945
a node ID from a test run, including line number, and use it as a
1946
positional argument in order to run only a single test.
1947
- fix issue 475: fail early and comprehensible if calling
1948
pytest.raises with wrong exception type.
1949
- fix issue516: tell in getting-started about current dependencies.
1950
- cleanup setup.py a bit and specify supported versions. Thanks Jurko
1951
Gospodnetic for the PR.
1952
- change XPASS colour to yellow rather then red when tests are run
1953
with -v.
1954
- fix issue473: work around mock putting an unbound method into a class
1955
dict when double-patching.
1956
- fix issue498: if a fixture finalizer fails, make sure that
1957
the fixture is still invalidated.
1958
- fix issue453: the result of the pytest_assertrepr_compare hook now gets
1959
it's newlines escaped so that format_exception does not blow up.
1960
- internal new warning system: pytest will now produce warnings when
1961
it detects oddities in your test collection or execution.
1962
Warnings are ultimately sent to a new pytest_logwarning hook which is
1963
currently only implemented by the terminal plugin which displays
1964
warnings in the summary line and shows more details when -rw (report on
1965
warnings) is specified.
1966
- change skips into warnings for test classes with an __init__ and
1967
callables in test modules which look like a test but are not functions.
1968
- fix issue436: improved finding of initial conftest files from command
1969
line arguments by using the result of parse_known_args rather than
1970
the previous flaky heuristics. Thanks Marc Abramowitz for tests
1971
and initial fixing approaches in this area.
1972
- fix issue #479: properly handle nose/unittest(2) SkipTest exceptions
1973
during collection/loading of test modules. Thanks to Marc Schlaich
1974
for the complete PR.
1975
- fix issue490: include pytest_load_initial_conftests in documentation
1976
and improve docstring.
1977
- fix issue472: clarify that ``pytest.config.getvalue()`` cannot work
1978
if it's triggered ahead of command line parsing.
1979
- merge PR123: improved integration with mock.patch decorator on tests.
1980
- fix issue412: messing with stdout/stderr FD-level streams is now
1981
captured without crashes.
1982
- fix issue483: trial/py33 works now properly. Thanks Daniel Grana for PR.
1983
- improve example for pytest integration with "python setup.py test"
1984
which now has a generic "-a" or "--pytest-args" option where you
1985
can pass additional options as a quoted string. Thanks Trevor Bekolay.
1986
- simplified internal capturing mechanism and made it more robust
1987
against tests or setups changing FD1/FD2, also better integrated
1988
now with pytest.pdb() in single tests.
1989
- improvements to pytest's own test-suite leakage detection, courtesy of PRs
1990
from Marc Abramowitz
1991
- fix issue492: avoid leak in test_writeorg. Thanks Marc Abramowitz.
1992
- fix issue493: don't run tests in doc directory with ``python setup.py test``
1993
(use tox -e doctesting for that)
1994
- fix issue486: better reporting and handling of early conftest loading failures
1995
- some cleanup and simplification of internal conftest handling.
1996
- work a bit harder to break reference cycles when catching exceptions.
1997
Thanks Jurko Gospodnetic.
1998
- fix issue443: fix skip examples to use proper comparison. Thanks Alex
1999
Groenholm.
2000
- support nose-style ``__test__`` attribute on modules, classes and
2001
functions, including unittest-style Classes. If set to False, the
2002
test will not be collected.
2003
- fix issue512: show "<notset>" for arguments which might not be set
2004
in monkeypatch plugin. Improves output in documentation.
2005
2006
-------------------------------------------------------------------
2007
Tue Jun 10 10:49:25 UTC 2014 - mvyskocil@opensuse.org
2008
2009
- Add setuptools dependency as py.test launcher does import pkg_resources
2010
2011
-------------------------------------------------------------------
2012
Wed Mar 12 16:09:57 UTC 2014 - speilicke@suse.com
2013
2014
- Update to version 2.5.2:
2015
- fix issue409 -- better interoperate with cx_freeze by not
2016
trying to import from collections.abc which causes problems
2017
for py27/cx_freeze. Thanks Wolfgang L. for reporting and tracking it down.
2018
- fixed docs and code to use "pytest" instead of "py.test" almost everywhere.
2019
Thanks Jurko Gospodnetic for the complete PR.
2020
- fix issue425: mention at end of "py.test -h" that --markers
2021
and --fixtures work according to specified test path (or current dir)
2022
- fix issue413: exceptions with unicode attributes are now printed
2023
correctly also on python2 and with pytest-xdist runs. (the fix
2024
requires py-1.4.20)
2025
- copy, cleanup and integrate py.io capture
2026
from pylib 1.4.20.dev2 (rev 13d9af95547e)
2027
- address issue416: clarify docs as to conftest.py loading semantics
2028
- fix issue429: comparing byte strings with non-ascii chars in assert
2029
expressions now work better. Thanks Floris Bruynooghe.
2030
- make capfd/capsys.capture private, its unused and shouldnt be exposed
2031
2032
-------------------------------------------------------------------
2033
Thu Jan 30 13:51:26 UTC 2014 - speilicke@suse.com
2034
2035
- Re-add python-argparse requirement for SP3
2036
2037
-------------------------------------------------------------------
2038
Fri Jan 3 08:43:16 UTC 2014 - mvyskocil@suse.com
2039
2040
- Update to 2.5.1:
2041
+ merge new documentation styling PR from Tobias Bieniek.
2042
+ fix issue403: allow parametrize of multiple same-name functions within
2043
a collection node.
2044
+ Allow parameterized fixtures to specify the ID of the parameters by
2045
adding an ids argument to pytest.fixture() and pytest.yield_fixture().
2046
+ fix issue404 by always using the binary xml escape in the junitxml
2047
plugin.
2048
+ fix issue407: fix addoption docstring to point to argparse instead of
2049
optparse.
2050
* 2.5.0:
2051
+ dropped python2.5 from automated release testing of pytest itself
2052
which means it's probably going to break soon
2053
+ simplified and fixed implementation for calling finalizers when
2054
parametrized fixtures or function arguments are involved. finalization
2055
is now performed lazily at setup time instead of in the "teardown phase".
2056
+ PR90: add --color=yes|no|auto option to force terminal coloring
2057
mode ("auto" is default).
2058
+ fix issue319 - correctly show unicode in assertion errors. Also means
2059
we depend on py>=1.4.19 now.
2060
+ fix issue396 - correctly sort and finalize class-scoped parametrized
2061
tests independently from number of methods on the class.
2062
+ refix issue323 in a better way -- parametrization should now never
2063
cause Runtime Recursion errors because the underlying algorithm
2064
for re-ordering tests per-scope/per-fixture is not recursive
2065
anymore
2066
+ fix issue290 - there is preliminary support now for parametrizing
2067
with repeated same values (sometimes useful to to test if calling
2068
a second time works as with the first time).
2069
+ close issue240 - document precisely how pytest module importing
2070
works, discuss the two common test directory layouts, and how it
2071
interacts with PEP420-namespace packages.
2072
+ fix issue246 fix finalizer order to be LIFO on independent fixtures
2073
depending on a parametrized higher-than-function scoped fixture.
2074
(was quite some effort so please bear with the complexity of
2075
this sentence :)
2076
+ fix issue244 by implementing special index for parameters to only use
2077
indices for paramentrized test ids
2078
+ fix issue287 by running all finalizers but saving the exception
2079
from the first failing finalizer and re-raising it so teardown will
2080
still have failed. We reraise the first failing exception because
2081
it might be the cause for other finalizers to fail.
2082
+ fix ordering when mock.patch or other standard decorator-wrappings
2083
are used with test methods. This fixues issue346 and should
2084
help with random "xdist" collection failures. Thanks to
2085
Ronny Pfannschmidt and Donald Stufft for helping to isolate it.
2086
+ and many more, see CHANGELOG for details
2087
- require python3-py at least 1.4.19
2088
- mark /etc/alternatives/py.test as ghost file for openSUSE 12.3+
2089
- skip test_simple.yml from %check
2090
2091
-------------------------------------------------------------------
2092
Thu Sep 19 12:20:25 UTC 2013 - speilicke@suse.com
2093
2094
- Skip running tests on SLE_11_SP2
2095
2096
-------------------------------------------------------------------
2097
Tue Jun 18 09:42:10 UTC 2013 - speilicke@suse.com
2098
2099
- Use update-alternatives
2100
2101
-------------------------------------------------------------------
2102
Mon Jun 17 08:45:18 UTC 2013 - speilicke@suse.com
2103
2104
- Update to version 2.3.5:
2105
+ never consider a fixture function for test function collection
2106
+ allow re-running of test items / helps to fix pytest-reruntests plugin
2107
and also help to keep less fixture/resource references alive
2108
+ put captured stdout/stderr into junitxml output even for passing tests
2109
(thanks Adam Goucher)
2110
+ Issue 265 - integrate nose setup/teardown with setupstate
2111
so it doesnt try to teardown if it did not setup
2112
+ issue 271 - dont write junitxml on slave nodes
2113
+ Issue 274 - dont try to show full doctest example
2114
when doctest does not know the example location
2115
+ issue 280 - disable assertion rewriting on buggy CPython 2.6.0
2116
+ inject "getfixture()" helper to retrieve fixtures from doctests,
2117
thanks Andreas Zeidler
2118
+ issue 259 - when assertion rewriting, be consistent with the default
2119
source encoding of ASCII on Python 2
2120
+ issue 251 - report a skip instead of ignoring classes with init
2121
+ issue250 unicode/str mixes in parametrization names and values now works
2122
+ issue257, assertion-triggered compilation of source ending in a
2123
comment line doesn't blow up in python2.5 (fixed through py>=1.4.13.dev6)
2124
+ fix --genscript option to generate standalone scripts that also
2125
work with python3.3 (importer ordering)
2126
+ issue171 - in assertion rewriting, show the repr of some
2127
global variables
2128
+ fix option help for "-k"
2129
+ move long description of distribution into README.rst
2130
+ improve docstring for metafunc.parametrize()
2131
+ fix bug where using capsys with pytest.set_trace() in a test
2132
function would break when looking at capsys.readouterr()
2133
+ allow to specify prefixes starting with "_" when
2134
customizing python_functions test discovery. (thanks Graham Horler)
2135
+ improve PYTEST_DEBUG tracing output by puting
2136
extra data on a new lines with additional indent
2137
+ ensure OutcomeExceptions like skip/fail have initialized exception attributes
2138
+ issue 260 - don't use nose special setup on plain unittest cases
2139
+ fix issue134 - print the collect errors that prevent running specified test items
2140
+ fix issue266 - accept unicode in MarkEvaluator expressions
2141
2142
-------------------------------------------------------------------
2143
Thu May 2 08:45:19 UTC 2013 - speilicke@suse.com
2144
2145
- Enable testsuite
2146
2147
-------------------------------------------------------------------
2148
Sat Apr 20 11:26:41 UTC 2013 - toms@opensuse.org
2149
2150
- Updated to version 2.3.4
2151
For details, see
2152
http://pytest.org/latest/changelog.html#changes-between-2-3-3-and-2-3-4
2153
No releases before 2.3.4 published (except the initial release).
2154
2155
- SPEC file changes:
2156
* Added build conditional with tests
2157
* Improved package description
2158
2159
-------------------------------------------------------------------
2160
Mon Feb 20 21:59:11 UTC 2012 - saschpe@gmx.de
2161
2162
- Initial version
2163
2164