Bruno Oliveira
2674f352e8
Merge pull request #3091 from nicoddemus/conftest-hooks
...
Document bootstrap and initialization hooks
2018-01-11 11:14:20 -02:00
Anthony Sottile
bd1d17e8de
Replace py.std with stdlib imports
2018-01-09 12:44:10 -08:00
Bruno Oliveira
b6b36bc167
Handle pluggy package or module for traceback filtering
...
Since 0.6.1 pluggy has been turned into a package
2018-01-08 21:29:15 -02:00
Bruno Oliveira
afb8a4e35d
Document bootstrap and initialization hooks
...
Fix #2616
2018-01-06 13:31:38 -02:00
Ian Lesperance
f24c470403
Assume not skipped by mark if attribute missing
...
Fixes #3074 .
2018-01-03 18:47:18 -05:00
Ronny Pfannschmidt
ed293ec3e9
pytester: no ignore files used to obtain current user metadata in the fd leak detector
2017-12-18 17:52:55 +01:00
Thomas Hisch
dfc5399cd7
Revert "WIP #3013"
...
This reverts commit 28a93b9eeb
.
2017-12-17 21:50:17 +01:00
Thomas Hisch
76489d30f7
Revert "WIP"
...
This reverts commit d6f75d2836
.
2017-12-17 21:49:57 +01:00
Thomas Hisch
d6f75d2836
WIP
2017-12-17 20:11:24 +01:00
Thomas Hisch
28a93b9eeb
WIP #3013
2017-12-17 06:54:57 +01:00
Bruno Oliveira
db4df5833a
Merge pull request #3030 from nicoddemus/leak
...
Fix memory leak caused by fixture values never been garbage collected
2017-12-14 19:20:34 -02:00
Bruno Oliveira
c3f63ac143
Fix memory leak caused by fixture values never been garbage collected
...
The leak was caused by the (unused) `FixtureRequest._fixture_values`
cache.
This was introduced because the `partial` object (created to call
FixtureDef.finish() bound with the Request) is kept alive
through the entire session when a function-scoped fixture depends
on a session-scoped (or higher) fixture because of the nested
`addfinalizer` calls.
FixtureDef.finish() started receiving a request object in order to
obtain the proper hook proxy object (#2127 ), but this does not seem
useful at all in practice because `pytest_fixture_post_finalizer`
will be called with the `request` object of the moment the fixture value
was *created*, not the request object active when the fixture value
is being destroyed. We should probably deprecate/remove the request
parameter from `pytest_fixture_post_finalizer`.
Fix #2981
2017-12-13 19:49:06 -02:00
Thomas Hisch
3862b0b28d
Remove logger parameter from catching_logs
...
The logger parameter of catching_logs is not used anywhere. The main
motivation for removing the logger parameter is that it removes the
logger = logger or logging.getLogger(logger)
line. IMO there are too many occurences of the string 'logg' ;)
2017-12-13 21:13:59 +01:00
Ronny Pfannschmidt
476d4df1b7
Merge pull request #3010 from cryvate/fix-issue-2985
...
Improve handling of pyargs
2017-12-13 13:56:42 +01:00
Ronny Pfannschmidt
52449903c3
Merge pull request #3023 from nicoddemus/preparse-deprecated
...
Add param annotations and types to hookspec
2017-12-13 13:51:20 +01:00
Ronny Pfannschmidt
506c9c91c0
Merge pull request #3025 from anntzer/dont-rewrite-plugin
...
Respect PYTEST_DONT_REWRITE for plugins too.
closes #2995
2017-12-13 12:34:51 +01:00
Bruno Oliveira
38f34e2fa1
Merge pull request #3012 from thisch/merge_contextmanagers
...
Integrate logging_using_handler into catching_logs
2017-12-13 06:59:48 -02:00
Antony Lee
45e7734b1a
Change set ops to use methods instead of operators.
2017-12-13 00:54:57 -08:00
Antony Lee
c8e7d1ae34
Respect PYTEST_DONT_REWRITE for plugins too.
2017-12-12 17:43:17 -08:00
Bruno Oliveira
7b5d4d01ed
Add param annotations and types to hookspec
...
Also mention which hook to use instead of the deprecated
pytest_cmdline_preparse
Fix #3022
2017-12-12 18:01:31 -02:00
Henk-Jaap Wagenaar
1e295535c3
Move _patched_find_module to module namespace.
2017-12-12 09:53:06 +00:00
Henk-Jaap Wagenaar
3ca1e4b7f0
Make patch for issue in pkgutil.ImpImporter local by using contextmanager.
2017-12-12 08:43:01 +00:00
Bruno Oliveira
5c6d7739bc
Merge pull request #3015 from jurko-gospodnetic/code-cleanup
...
Code cleanup
2017-12-11 22:15:50 -02:00
Srinivas Reddy Thatiparthy
fc544dc660
remove redundant checking because
...
* isinstance([], Sequence) is True
* isinstance((), Sequence) is True
2017-12-12 00:10:59 +05:30
Srinivas Reddy Thatiparthy
7792587b3f
remove unnecessary import
2017-12-12 00:03:38 +05:30
Srinivas Reddy Thatiparthy
cb0ba18f53
remove '_ast' module; and redirect '_ast' references to 'ast'
2017-12-11 23:14:17 +05:30
Jurko Gospodnetić
596937e610
remove extra whitespace
2017-12-09 13:34:55 +01:00
Jurko Gospodnetić
57fcd3f57e
remove corpse code comments
2017-12-09 13:34:55 +01:00
Jurko Gospodnetić
65f5383106
fix comment & docstring typos, line wrapping & wording
2017-12-09 13:34:54 +01:00
Thomas Hisch
ba209b5230
Integrate logging_using_handler into catching_logs
...
logging_using_handler is only used in catching_logs. Therefore it makes
sense to remove one of the many context managers from the logging
plugin.
2017-12-07 16:34:53 +01:00
Henk-Jaap Wagenaar
b62fd79c0c
Fix issue 2985.
2017-12-07 15:12:44 +00: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
Ronny Pfannschmidt
2e8b0a83fe
Merge pull request #2989 from nicoddemus/bring-tr-writer-back-2984
...
Bring back TerminalReporter.writer as an alias to TerminalReporter._tw
2017-12-01 17:42:31 +01:00
Bruno Oliveira
369c711f14
Merge pull request #2971 from blueyed/fix-ZeroDivisionError
...
Fix ZeroDivisionError with 0 collected tests
2017-11-30 21:12:46 -02: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
70f1e3b4b0
Improve getscopeitem assertion message
...
Fix #2979
2017-11-30 07:53:43 -02:00
Florian Bruhin
88ed1ab648
Merge pull request #2964 from rpuntaie/master
...
fix issue #2920
2017-11-29 10:32:28 +01:00
Florian Bruhin
191e8c6d9b
Merge pull request #2969 from nicoddemus/null-bytes-2957
...
Always escape null bytes when setting PYTEST_CURRENT_TEST
2017-11-29 06:57:48 +01:00
Daniel Hahler
0f5fb7ed05
Fix ZeroDivisionError with 0 collected tests
...
This can easily happen with pytest-testmon.
2017-11-29 00:54:14 +01:00
Bruno Oliveira
89cf943e04
Always escape null bytes when setting PYTEST_CURRENT_TEST
...
Fix #2957
2017-11-28 19:45:13 -02:00
Roland Puntaier
4ea7bbc197
fix issue #2920
2017-11-28 16:47:12 +01:00
Bruno Oliveira
796db80ca4
Only escape str-like arguments passed to warnings
...
Fix #2956
2017-11-27 23:17:15 -02:00
Bruno Oliveira
4678cbeb91
Merge remote-tracking branch 'upstream/features'
2017-11-27 19:37:58 -02:00
Bruno Oliveira
c58715371c
Merge pull request #2954 from blueyed/rewritten
...
Fix spelling: s/re-writ/rewrit/g
2017-11-26 18:12:30 -02:00
Daniel Hahler
d5f038e29a
Fix spelling: s/re-writ/rewrit/g
...
This also fixes "can not" to "cannot" in the "Module already imported so
cannot be rewritten" assertion error.
2017-11-26 20:46:06 +01: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
05cfdcc8cb
Revert making TerminalWriter public in TerminalReporter plugin
...
We eventually want to replace py.io.TerminalWriter (exposed as
"_tw" in TerminalReporter) by something else, so deprecating access
to "_tw" and making it public as "writer" is contrary to that.
2017-11-23 19:53:12 -02:00
Bruno Oliveira
f50ace7c0a
Merge remote-tracking branch 'upstream/master' into release-3.3.0
2017-11-23 20:20:40 +00:00
Bruno Oliveira
1d26f3730f
Fix docstrings in pytester
2017-11-22 17:15:59 -02:00
Sviatoslav Abakumov
5e71ffab87
Handle marks without description
2017-11-22 15:47:15 +03:00