Ronny Pfannschmidt
b825af2e66
pass trough annotated exceptions
2016-01-23 19:31:17 +01:00
Ronny Pfannschmidt
60e9698530
fix issue 1338
2016-01-23 19:12:51 +01:00
Ronny Pfannschmidt
9e6bb74d71
reformat monkeypatch core plugin/its tests
2016-01-23 19:12:51 +01:00
Georgy Dyuldin
b28b3cc271
Add captured stdout to jUnit report on setup error
2016-01-20 20:13:01 +03:00
Bruno Oliveira
7b13c4bec0
Fix flakes
2016-01-14 21:01:57 -02:00
Ronny Pfannschmidt
b2c0864fbf
Merge pull request #1318 from nicoddemus/doctest-unicode-error
...
Fix decode error in Python 2.7 when docstrings contain a non-ascii character
2016-01-11 08:37:24 +01:00
foxx
f46de68804
Fixes bug with stdout/stderr capture on pdb
2016-01-09 12:04:26 +00:00
Bruno Oliveira
3c19cfcd9a
Fix decode error in Python 2.7 when docstrings contain a non-ascii character
...
Fix #628
2016-01-08 23:10:02 -02:00
Bruno Oliveira
369d9ecaa5
pytest warnings emitted during ``pytest_terminal_summary`` are now properly displayed.
...
Fix #1305
2016-01-04 00:07:45 -02:00
Ulrich Petri
8d49abb0d1
Make monkeypatch differentiate ImportError sources
...
Previously `monkeypatch` assumed that any `ImportError` was caused by
a mistake in the specified import path. However this assumption is false
in case the import target itself causes an `ImportError`.
Fixes : #900
2015-12-27 22:44:23 +01:00
Ronny Pfannschmidt
ec5a429c77
junitxml tests: extend with extra items
2015-12-17 22:30:27 +01:00
Ronny Pfannschmidt
713069ebd4
implement review comments for #1266
2015-12-17 22:27:01 +01:00
Ronny Pfannschmidt
8bf7e7cc4b
fixes #1259 - take finalized nodes out of the mapping
...
this allows double node id usage for file based items
2015-12-16 19:09:44 +01:00
aselus-hub
1216a27b44
added docstrign to inection collection test.
2015-12-10 15:19:08 -08:00
aselus-hub
74f7efd2a3
added line comparison that is pytest-sugar agnostic.
2015-12-10 15:10:55 -08:00
aselus-hub
34db8aed34
added verification that test actually passed.
2015-12-10 15:02:57 -08:00
aselus-hub
af54e09759
nit: fixed newline
2015-12-10 14:46:51 -08:00
aselus-hub
dfaeefd692
added test to verify injection.
2015-12-10 14:45:36 -08:00
Bruno Oliveira
1c46462991
Fix deprecated_call regression introduced in 2.8.4
...
Fix #1238
2015-12-08 22:40:05 -02:00
Ronny Pfannschmidt
7b7737bf96
handle duplicate test ids via collection and xdist each reporting
2015-12-07 21:54:25 +01:00
Ronny Pfannschmidt
04e9ae75c8
add xfailing test for double test id failure
2015-12-07 21:54:25 +01:00
Ronny Pfannschmidt
5eef6a2821
junitxml: fix python3 compat of the tests
2015-12-07 21:54:25 +01:00
Ronny Pfannschmidt
5f5a7995b9
reintroduce junitxml report order and debug cleanups
2015-12-07 21:54:24 +01:00
Ronny Pfannschmidt
0528e5b45f
junitxml: intermediate, move testcase generation to NodeReporter
2015-12-07 21:54:24 +01:00
Ronny Pfannschmidt
9b04958303
junitxml: keep track of custom property insert order
...
+ review: should we allow the same key multile times
2015-12-07 21:54:24 +01:00
Ronny Pfannschmidt
d0107c898e
junitxml restrucutre stat generation - use node tags
2015-12-07 21:54:24 +01:00
Ronny Pfannschmidt
9128fec4c4
junitxml: simplify the api used for testing junitml
2015-12-07 21:54:24 +01:00
Ronny Pfannschmidt
80bcf8d624
junitxml: simplify tests by creating a api wrapper
2015-12-07 21:54:24 +01:00
Ronny Pfannschmidt
b8df5446c0
junitxml: yapf clean the tests
2015-12-07 21:54:24 +01:00
Bruno Oliveira
14bc3c4009
Fix pastebin when captured output contains non-ascii characters
...
Fix #1219
2015-12-03 20:07:18 -02:00
Bruno Oliveira
a54e4e64cd
Merge remote-tracking branch 'upstream/master' into pastebin-py3
2015-12-01 23:51:14 -02:00
Bruno Oliveira
6a2ebddc7c
Decode urlopen response in pastebin
...
Fix #1198
2015-12-01 23:33:37 -02:00
Florian Bruhin
0d2668017d
Fix spelling mistake in #1207 .
2015-11-30 17:33:34 +01:00
Florian Bruhin
aba55a0fb2
Fix terminal output if no tests were run.
...
Before:
==== in 0.00 seconds ====
After:
==== no tests run in 0.00 seconds ====
2015-11-30 17:24:40 +01:00
Ronny Pfannschmidt
b5d65e5139
Merge pull request #1206 from The-Compiler/collect-getattr
...
Don't collect classes with truthy __getattr__.
2015-11-30 17:23:47 +01:00
Florian Bruhin
ba9146c131
Don't collect classes with truthy __getattr__.
...
When we have a metaclass which returns something truthy (like a method) in its
__getattr__, we collected the class because pytest thought its __test__
attribute was set to True.
We can work around this to some degree by assuming __test__ will always be set
to an explicit True if that's what the user has intended, and if it's something
other than that, this is probably a mistake.
Fixes #1204 .
2015-11-30 16:41:13 +01:00
Florian Bruhin
c790f7475e
Fix getting line number with nasty __getattr__.
...
When an object has a custom __getattr__ which always returns a non-int, we
tried to get compat_co_firstlineno from it and checked it was a integer, which
caused an exception if such a class is mistakenly collected.
If we still mistakenly collect such a class (which is likely to be something
other than a test), we now skip it with a warning (because it probably has an
__init__) instead of producing an error.
See #1204 .
2015-11-30 16:13:15 +01:00
mehdy
f9b1e39b8a
fix #1198 - decoding monkeypatched data to unicode
2015-11-29 19:42:50 +03:30
Bruno Oliveira
603d81ef2f
deprecated_call now uses monkey patching strategy to capture warnings
...
similar to what we had in 2.7, with a few enhancements
Fix #1190
2015-11-26 16:48:58 -02:00
Bruno Oliveira
7d6edb9ca5
Fix unittest.skip decorator test and separate the fix into a different, self-doc function
2015-11-04 19:54:18 -02:00
Lee Kamentsky
313050b15b
Suggested edits by Bruno.
...
Moved fix to TestCaseFunction.setup. Added myself to AUTHORS and added entry to CHANGELOG
2015-11-04 15:30:16 -05:00
Lee Kamentsky
1833547936
Added test for issue #1169
...
(I undid my fix, checked for failure, redid my fix and it passes)
2015-11-04 14:24:22 -05:00
Bruno Oliveira
311b0a9683
Fix situation where a traceback entry "path" returns a str object
...
Fix #1133
2015-10-16 20:18:14 -03:00
Michael Birtwell
a3bda59a30
collection: Prevent non-function callables from being collected
...
Fixes issue 331
previously to this change the collection code would issue a warning for
when ever it encountered a variable that looked like a test but wasn't a
function saying that it wouldn't collect it because it wasn't a function.
This fixes the logic so that if that warning is issued it really isn't
collected.
However previously special cases existed to support tests that were
created using functools.wraps and functools.partial. So the condition for
issuing that warning has been updated to take that in to account
Also try the old way of detecting functions just for proper integration
with mock.path in python 2.7 the get_real_func returned the unbound method
2015-10-12 22:23:18 +01:00
Ronny Pfannschmidt
db077555f6
Merge pull request #1102 from nicoddemus/doctest-fixtures-fix
...
Fix autouse fixtures and doctest modules
2015-10-10 14:21:53 +02:00
TomV
707226298a
issue1035 add test for classes setting __getattr__
2015-10-08 09:08:32 +01:00
Bruno Oliveira
a14c77aeba
Fix problems when mixing autouse fixtures and doctest modules
...
The main problem was that previously DoctestModule was setting
up its fixtures during collection, instead of letting
each DoctestItem make its own fixture setup
Fix #1100
Fix #1057
2015-10-03 16:07:14 -03:00
Bruno Oliveira
f3cee8f0b5
Merge remote-tracking branch 'upstream/master' into param-ids-fix
2015-10-01 07:58:55 -03:00
Bruno Oliveira
d1e00f6e19
Detect dynamic code explicitly in filter_traceback
2015-09-30 17:32:49 -03:00
Bruno Oliveira
11f100813e
Fix internal error when filtering tracebacks where one entry was generated by an exec() statement
...
Fix #995
2015-09-29 22:29:43 -03:00