Commit Graph

16 Commits

Author SHA1 Message Date
Jurko Gospodnetić f3c9c6e8a8 fix restoring Python state after in-process pytest runs
Now each in-process pytest run saves a snapshot of important global Python
state and restores it after the test completes, including the list of loaded
modules & the Python path settings.

Previously only the loaded package data was getting restored, but that was
also reverting any loaded package changes done in the test triggering the
pytest runs, and not only those done by the pytest runs themselves.

Updated acceptance tests broken by this change, which were only passing before
by accident as they were making multiple pytest runs with later ones depending
on sys.path changes left behind by the initial one.
2017-12-17 12:47:50 +01:00
Florian Bruhin ce30896cd2 Also blacklist pytest-capturelog plugin
This is the older plugin before pytest-catchlog was around. Apparently there are
people still using it.

Fixes #3004
2017-12-05 20:02:56 +01:00
Bruno Oliveira cf0cac3b73 Bring back TerminalReporter.writer as an alias to TerminalReporter._tw
Fix #2984
2017-11-30 19:56:47 -02:00
Bruno Oliveira 95de11a44e Block pytest-catchlog and issue a warning
Trying to install pytest-3.3 and pytest-catchlog will result in an
option conflicts because both declare the same options.
2017-11-23 19:53:12 -02:00
Bruno Oliveira 1f08d990d5 Deprecate metafunc.addcall
Fix #2876
2017-11-15 15:16:00 -02:00
Bruno Oliveira 3288c9a110 Improve user guidance regarding ``--resultlog`` deprecation
Fix #2739
2017-08-31 19:11:41 -03:00
Pauli Virtanen 8a7d98fed9 Make YIELD_TEST warning less spammy
Emit it only once per each generator, rather than for each generated
function. Also add information about which test caused it to be emitted.
2017-07-10 21:41:09 +02:00
Bruno Oliveira 9f85584656 Merge remote-tracking branch 'upstream/features' into integrate-pytest-warnings 2017-03-20 19:59:05 -03:00
Bruno Oliveira 42a5d6bdfa Add __future__ imports to all pytest modules
This prevents silly errors from creeping in Python 2 when testing in Python 3
2017-03-16 22:45:40 -03:00
Bruno Oliveira 78194093af Improve warning representation in terminal plugin and fix tests 2017-03-16 21:57:32 -03:00
Bruno Oliveira 337f891d78 Fixed tests 2017-03-16 20:01:47 -03:00
Michal Wajszczuk fb0b90646e New-style classes implemented for python 2.7 - #2147 2017-02-16 20:28:17 +01:00
Florian Bruhin 789e4670e7 Merge pull request #1813 from nicoddemus/pytest-setup.cfg
Support [tool:pytest] in setup.cfg files
2016-08-17 20:33:57 +02:00
Bruno Oliveira ab86dea529 Support [tool:pytest] in setup.cfg files
Also deprecate [pytest] usage in setup.cfg files

Fix #567
2016-08-17 08:19:38 -03:00
Bruno Oliveira f25771a101 Deprecate --resultlog cmdline option
Fix #830
2016-08-16 21:40:34 -03:00
Bruno Oliveira 6c8b0a28e1 Add deprecation module to centralize deprecation messages and bits of code 2016-07-25 18:14:39 -03:00