Florian Bruhin
75160547f2
Use a callable __tracebackhide__ for filtering
...
While this leads to slightly more complicated user code for the common
case (checking if the exception is of a given type) it's easier to
implement and more flexible.
2016-04-20 11:09:27 +02:00
Florian Bruhin
4c552d4ef7
Fix tests for python 2.6
2016-04-20 10:36:13 +02:00
Florian Bruhin
b607f6728f
Filter selectively with __tracebackhide__
...
When __tracebackhide__ gets set to an exception type or list/tuple of
exception types, only those exceptions get filtered, while the full
traceback is shown if another exception (e.g. a bug in a assertion
helper) happens.
2016-04-20 10:25:33 +02:00
Ronny Pfannschmidt
0f7aeafe7c
Merge pull request #1486 from roolebo/fix-issue-138
...
Fix issue #138 - support chained exceptions
2016-04-03 19:21:57 +02:00
Omar Kohl
c578226d43
Implement ExceptionInfo.match() to match regexp on str(exception)
...
This implements similar functionality to
unittest.TestCase.assertRegexpMatches()
closes #372
2016-04-03 11:22:44 +02:00
Roman Bolshakov
fbc5ba08d9
Fix issue #138
2016-03-20 01:02:17 +03:00
Bruno Oliveira
a912d3745b
Moved py.code code over to py.test
...
Fix #103
2016-01-25 23:18:04 -02:00
holger krekel
d1aff902d5
remove pylib things and move things to new pytest namespace
...
--HG--
branch : trunk
2010-10-07 11:59:00 +02:00
holger krekel
6f40441ef8
fixing test for python2.4 (thanks ronny)
...
--HG--
branch : trunk
2010-09-08 18:29:26 +02:00
Ronny Pfannschmidt
2b59200786
implement and naively test the native traceback style
...
--HG--
branch : trunk
2010-09-08 12:00:36 +02:00
holger krekel
677f7c0a6a
remove trailing whitespace everywhere
...
--HG--
branch : trunk
2010-07-26 21:15:15 +02:00
holger krekel
29a5b7452e
* improve and test --tb=short reporting
...
* show --tb=short tracebacks for importing test modules
--HG--
branch : trunk
2010-05-22 16:18:24 +02:00
holger krekel
379390a8aa
remove code.new() function and store lines directly into linecache.cache instead.
...
This avoids the need for custom code objects, improving compatibility for jython
and pypy-c.
--HG--
branch : trunk
2010-05-11 22:54:04 +02:00
holger krekel
221ac3e466
a couple of more mostly jython-related fixes
...
--HG--
branch : trunk
2010-04-23 13:29:28 +02:00
holger krekel
55fcc5a219
always directly use basename for tracebacks, independently from code.path
...
fixes issue77 although i guess it was already fixed before.
--HG--
branch : trunk
2010-01-18 12:12:18 +01:00
holger krekel
0149771997
refine excludepath handling to treat entries with no path as matching
...
--HG--
branch : trunk
2010-01-18 03:04:20 +01:00
holger krekel
9da1ba40ed
move down py/impl/XYZ to py/_XYZ
...
--HG--
branch : trunk
2010-01-13 17:15:54 +01:00
holger krekel
ba1451330e
refine rsyncing and internal dir/transferal handling: don't transfer roots in a popen- no-chdir situation and only use one py._pydir everywhere
...
--HG--
branch : trunk
2010-01-11 14:30:50 +01:00
holger krekel
77b640d1b7
streamline some tests and overall reduce py.test.ensuretemp usage, note down issue about deprecation .
...
--HG--
branch : trunk
2009-12-29 22:26:03 +01:00
holger krekel
b04a04cabd
make py lib a self-contained directory again
...
- move and merge _py/ bits back to py/
- fixes all around
--HG--
branch : trunk
2009-11-04 21:34:07 +01:00
holger krekel
d2e6cd0523
first round of fixing jython compatibility issues, marking some tests as xfail-on-jython
...
--HG--
branch : trunk
2009-10-27 21:34:11 +01:00
holger krekel
33bd39053f
using apipkg 1.0b2 snapshot version - adjusting/cleaning up some impl-detail accesses
...
--HG--
branch : trunk
2009-10-27 21:31:42 +01:00
holger krekel
5791c06bf2
rewrote the initpkg mechanism and moved py lib implementation files to
...
_py/... with py/__init__.py containing pointers into them
The new apipkg is only around 70 lines of code and allows
us to get rid of the infamous "py.__." by regular non-magical
"_py." imports. It is also available as a separately installable
package, see http://bitbucket.org/hpk42/apipkg
--HG--
branch : trunk
2009-10-03 01:47:39 +02:00
holger krekel
c8119d89b6
move test files out of py lib proper
...
* separate all tests from plugins
* simplify implicit inclusion of plugins under test
* have test_initpkg perform direct checks instead of yielding tests
* fix example tests for 3k
--HG--
branch : trunk
2009-09-06 16:59:39 +02:00