Michal Wajszczuk
fb0b90646e
New-style classes implemented for python 2.7 - #2147
2017-02-16 20:28:17 +01:00
Bruno Oliveira
984d4ce5ec
Fix test_excinfo_getstatement that broke because of whitespace changes
2016-11-20 19:12:42 -02:00
Bruno Oliveira
1eb5a690d4
Fix flake8 E305 and E306 errors
...
These errors started to appear with flake8-3.1.1, while they don't appear with
version 3.1.0 (weird).
2016-11-20 18:59:15 -02:00
Bruno Oliveira
006a901b86
Properly handle exceptions in multiprocessing tasks
...
Fix #1984
2016-11-03 10:48:43 -02:00
Bruno Oliveira
31c5194562
Fix broken test in py3k
2016-08-01 18:35:42 -03:00
satoru
3c8222f1db
Highlight the path of file location in error report
...
So that it's more obvious when we need to copy the file path.
2016-08-01 17:42:20 -03:00
Floris Bruynooghe
d1852a48b7
Remove assertion reinterpretation
...
The assertion reinterpretation is an old backwards compatibility
mode which was no longer being maintained on feature-parity with
the assertion rewriting mode. It was also responsible for some
dubious patching of builtins and test with side-effects would
suddenly start passing. Since re-writing has been the default for
a long time and plugins are now also re-written it is time to
retire reinterpretation.
2016-07-15 00:33:39 +01:00
Bruno Oliveira
458ecae1df
Replace all usages of "pytest_funcarg__" for @pytest.fixture
2016-07-11 22:21:52 -03:00
Bruno Oliveira
5506dc700c
Deprecate yield tests
...
Closes #16
Closes #1324
2016-07-11 22:21:49 -03:00
Ronny Pfannschmidt
b9a91dc112
merge from master to features
2016-07-06 11:51:48 +02:00
Ronny Pfannschmidt
1451a1ab00
remove unsupported python versions from code/source xfail
2016-06-30 10:03:40 +02:00
Tom Viner
df9918eda3
issue1625, name getfuncargvalue to getfixturevalue
2016-06-24 10:08:19 +02:00
Ronny Pfannschmidt
083f64100d
merge master into features
2016-06-22 14:39:33 +02:00
marscher
09d163aa3a
[exception handling] Fix case the current working directory (CWD) gets deleted during testing.
...
Fixes #1235 .
2016-06-08 15:18:23 +02:00
Ronny Pfannschmidt
c49863aa63
merge next chunk from master and fix changelog linting issue
2016-05-13 19:36:47 +02:00
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
Martin Prusse
7ce5873da2
Perform a "unicode aware" check for maximum recursion depth error
...
Avoid errors `UnicodeErrosr`s due non maximum recursion depth errors
when checking for those errors.
2016-04-08 23:32:18 -03: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
a736e26734
Merge remote-tracking branch 'pytest-dev/master' into fix-issue-138
2016-03-20 01:04:22 +03:00
Roman Bolshakov
fbc5ba08d9
Fix issue #138
2016-03-20 01:02:17 +03:00
Bruno Oliveira
d8403d793f
Fix decoding issue while formatting SyntaxErrors during collection
...
This happens only in Python 2, as in Python 3 we receive
the "badline" in the exception is already properly encoded
Fix #578
2016-03-05 16:58:50 -03:00
Bruno Oliveira
9f85d4c952
mark test_comments as xfail on pypy
...
while migrating this code it was noticed that this test was failing even
on the original py repository, so it was decided to xfail it and investigate
later
2016-01-25 23:18:04 -02:00
Bruno Oliveira
7a6f902f6f
Drop assertionnew and assertionold from _pytest._code
2016-01-25 23:18:04 -02: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
253c173a88
skip attribute tests on <(2,6)
...
--HG--
branch : trunk
2010-10-06 19:57:14 +02:00
Floris Bruynooghe
ec5ea5c05e
Show final value first when explaining an attribute
...
Then show the expansion as a "where" part of the explanation.
--HG--
branch : trunk
2010-10-06 18:20:09 +01:00
holger krekel
77cacb99ee
to better match the naming of the corresponding AST (and in case
...
we want to add more customizations later)
rename pytest_assert_binrepr -> pytest_assertrepr_compare
rename binrepr -> reprcompare
--HG--
branch : trunk
2010-10-02 19:00:47 +02:00
holger krekel
1ff173baee
refactor assert interpretation to invoke a simple callable
...
and let the assertion plugin handle the hook invocation
and its multi-results and also pass in an (optional) test config
object to the hook. Add and refactor also a few tests.
--HG--
branch : trunk
2010-10-02 18:47:39 +02:00
holger krekel
e2c11f1ddb
fix python3 issues, add py32 environment
...
--HG--
branch : trunk
2010-09-28 17:37:20 +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
efeae72509
fixes issue113 - assertion represenation issue
...
--HG--
branch : trunk
2010-07-29 12:55:39 +02:00
holger krekel
677f7c0a6a
remove trailing whitespace everywhere
...
--HG--
branch : trunk
2010-07-26 21:15:15 +02:00
holger krekel
b28c439494
some minor compatibility issues wrt to the just released python2.7
...
--HG--
branch : trunk
2010-07-04 22:13:12 +02:00
Benjamin Peterson
4d75c703a0
correct expected message
...
--HG--
branch : trunk
2010-06-18 22:55:06 -05:00
Benjamin Peterson
2995d65720
fix assertion interpretation when the operator is **
...
--HG--
branch : trunk
2010-06-10 13:50:07 -05:00
Benjamin Peterson
610cde6f85
Interpret assignments while examining asserts corrects
...
fixes #105
--HG--
branch : trunk
2010-06-09 14:53:11 -05:00
holger krekel
10b8de060a
fix py.code.compile to generate unique filenames
...
--HG--
branch : trunk
2010-06-06 19:08:22 +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
578cba20d4
fix issue94 make reporting more robust against bogus source code
...
(and internally be more careful when presenting unexpected byte sequences)
also make py.code.Source accept a list of lines directly.
--HG--
branch : trunk
2010-05-21 16:42:46 +02:00
holger krekel
f97e082543
fix test to work on jython and cpy
...
--HG--
branch : trunk
2010-05-14 15:25:24 +02:00
holger krekel
169d8d1e54
fix test to account for jython python file ending
...
--HG--
branch : trunk
2010-05-12 14:12:07 +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
5ece3858e4
introduce new py.io.saferepr for printing the 'repr' of an object safely
...
and without consuming too much space
--HG--
branch : trunk
2010-04-29 14:17:07 +02:00
holger krekel
030548bc73
expose py.code._reinterpret functions so that pypy and internal
...
uses don't need to go through internal implementation imports
--HG--
branch : trunk
2010-04-29 01:20:56 +02:00
holger krekel
22a50a5b88
* various jython related fixes.
...
* more care for print-errors including unicode-encoding related errors.
--HG--
branch : trunk
2010-04-28 15:24:38 +02:00