Bruno Oliveira
de09023e45
Also capture warnings during setup/teardown
2017-03-04 16:15:03 -03:00
Bruno Oliveira
e24081bf76
Change warning output
2017-03-04 15:59:20 -03:00
Omer Hadari
6a52fe1650
fixed internal error on unprintable raised AssertionErrors
2017-03-04 10:26:46 +02:00
Katerina Koukiou
26e50f1162
junitxml: adjust junitxml output file to comply with JUnit xsd
...
Change XML file structure in the manner that failures in call and errors
in teardown in one test will appear under separate testcase elements in
the XML report.
2017-03-02 15:10:25 +01:00
Anthony Sottile
6ba3475448
Make capsys more like stdio streams in python3. Resolves #1407 .
2017-02-23 17:46:27 -08:00
Katerina Koukiou
d3a6be4130
junitxml: Fix double system-out tags per testcase
...
In the xml report we now have two occurences for the system-out tag if
the testcase writes to stdout both on call and teardown and fails in
teardown.
This behaviour is against the xsd.
This patch makes sure that the system-out section exists only
once per testcase.
2017-02-22 16:39:20 +01:00
Bruno Oliveira
82785fcd40
Use warnings.catch_warnings instead of WarningsRecorder
...
This has the benefical side-effect of not calling the original
warnings.showwarnings function, which in its original form
only writes the formatted warning to sys.stdout.
Calling the original warnings.showwarnings has the effect that nested WarningsRecorder all catch the warnings:
with WarningsRecorder() as rec1:
with WarningsRecorder() as rec2:
warnings.warn(UserWarning, 'some warning')
(both rec1 and rec2 sees the warning)
When running tests with `testdir`, the main pytest session would then see the warnings created by
the internal code being tested (if any), and the main pytest session would end up with warnings as well.
2017-02-18 13:08:14 -02:00
Bruno Oliveira
a7643a5fbe
Merge branch 'features' into integrate-pytest-warnings
2017-02-18 11:03:15 -02:00
Michal Wajszczuk
fb0b90646e
New-style classes implemented for python 2.7 - #2147
2017-02-16 20:28:17 +01:00
Bruno Oliveira
9c809f5ad0
Merge pull request #2255 from scop/spelling
...
Spelling fixes
2017-02-15 18:41:49 -02:00
Ville Skyttä
ede4e9171f
Spelling fixes
2017-02-15 17:00:58 +02:00
Bruno Oliveira
9eb1d73951
--override-ini now correctly overrides some fundamental options like "python_files"
...
#2238
2017-02-08 23:03:33 -02:00
Bruno Oliveira
6a097aa0f1
Merge branch 'master' into allow_skipping_unittests_with_pdb_active
2017-02-08 20:30:14 -02:00
Ran Benita
3a0a0c2df9
Ignore errors raised from descriptors when collecting fixtures
...
Descriptors (e.g. properties) such as in the added test case are
triggered during collection, executing arbitrary code which can raise.
Previously, such exceptions were propagated and failed the collection.
Now these exceptions are caught and the corresponding attributes are
silently ignored.
A better solution would be to completely skip access to all custom
descriptors, such that the offending code doesn't even trigger. However
I think this requires manually going through the instance and all of its
MRO for each and every attribute checking if it might be a proper
fixture before accessing it. So I took the easy route here.
In other words, putting something like this in your test class is still
a bad idea...:
@property
def innocent(self):
os.system('rm -rf /')
Fixes #2234 .
2017-02-07 14:27:34 +02:00
Vidar Tonaas Fauske
832c89dd5f
Test for `pytest.mark.xfail` with non-Python Item
2017-02-03 17:13:05 +01:00
Bruno Oliveira
abbff681ba
Fix '{0}' format for py26
2017-02-02 18:01:44 -02:00
Thomas Kriechbaumer
43662ce789
allow error message matching in pytest.raises
2017-02-02 19:52:33 +01:00
mbyt
ad56cd8027
extract a _handle_skip method, secure PY2 branch
2017-02-02 05:01:51 +01:00
mbyt
d1c725078a
Allow to skip unittests if --pdb active
...
closes #2137
2017-01-31 04:47:31 +01:00
Ronny Pfannschmidt
3b47cb45e6
Merge pull request #2222 from RonnyPfannschmidt/features
...
merge master into features
2017-01-26 13:48:10 +01:00
Ronny Pfannschmidt
713bdc1f9f
merge master into features
2017-01-26 12:00:52 +01:00
Ravi Chandra
0e58c3fa80
updates for PR review #2198
2017-01-21 16:47:49 +13:00
Ravi Chandra
c848d0a771
Pass parameter name to `make_parametrize_id` hook function
2017-01-21 16:46:45 +13:00
Ronny Pfannschmidt
e0c48b4fe7
Merge pull request #2212 from nicoddemus/pytester-rewrite
...
Assert statements of the pytester plugin again benefit from assertion rewriting
fixes #1920
2017-01-20 10:04:12 +01:00
Bruno Oliveira
7b4368f3f4
Merge pull request #2184 from eli-b/parseoutcomes-explicit-failure
...
Fail assert_outcomes() on missing terminal report
2017-01-19 21:38:54 -02:00
Bruno Oliveira
c477f09177
Assert statements of the pytester plugin again benefit from assertion rewriting
...
Fix #1920
2017-01-19 21:33:51 -02:00
Ronny Pfannschmidt
123289a88e
fixes #2208 by introducing a iteration limit
2017-01-19 11:38:15 +01:00
Bruno Oliveira
7cd7c283dd
Refactor plugin specs handling into an isolated function
2017-01-12 14:31:35 -02:00
Bruno Oliveira
043aadeaf2
Consider plugins loaded by PYTEST_PLUGINS for assertion rewrite
...
Fix #2185
2017-01-11 17:15:16 -02:00
Eli Boyarski
e18b2a427a
Fail assert_outcomes() on missing terminal report
...
Currently if the terminal report of testdir.runpytest() is missing,
assert_outcomes() on its output fails because parseoutcomes()
returns an unexpected value (None).
It's better to fail parseoutcomes() directly.
2017-01-11 17:09:37 +02:00
Jeff Widman
6d81c684cc
Switch monkeypatch fixture to yield syntax
2017-01-04 15:06:52 -08:00
Loïc Estève
7930a8373d
Newline for flake8
2017-01-03 10:57:19 -02:00
Loïc Estève
0bd8159b60
Add a test when multiple classes are specified in warns
2017-01-03 10:57:19 -02:00
Loïc Estève
6fd0394c63
pytest.warns checks for subclass relationship
...
rather than class equality. This makes it more similar to
pytest.raises.
2017-01-03 10:57:19 -02:00
Rafael Bertoldi
a9193a1531
No longer silently ignore errors in parametrize callable ids
2017-01-02 17:26:17 -02:00
Bruno Oliveira
402fbe503a
Merge branch 'master' into merge-master-into-features
2016-12-27 23:31:26 -02:00
Bruno Oliveira
091148f843
Merge pull request #2136 from hroncok/i2132
...
Tests: Check for ModuleNotFoundError on Python 3.6+
2016-12-27 23:10:58 -02:00
Bruno Oliveira
718f0b0255
Merge pull request #2130 from malinoff/fix-2129
...
Use inspect to properly detect generators. Fixes #2129
2016-12-27 22:11:46 -02:00
Bruno Oliveira
515fb09995
Move module error compatibility code to _pytest.compat
2016-12-27 22:01:22 -02:00
Miro Hrončok
1680eeb3a3
Tests: Check for ModuleNotFoundError on Python 3.6+
...
Those tests originally checked for ImportError. Since Python 3.6
ModuleNotFoundError is raised in this context instead, the tests didn't work
as they are text based (so exception inheritance does not save the day).
Fixes https://github.com/pytest-dev/pytest/issues/2132
2016-12-27 23:15:12 +01:00
Andreas Pelme
0bb8a4a36d
Fixed #2148 - parse directory names properly when args contains ::.
...
This commit also improves readbility in get_dirs_from_args by using self
documenting local functions.
get_dirs_from_args also now only returns directories that actually exists,
and not files to avoid confusion.
This commit also removes redundant checks in get_common_ancestor that
was already performed in get_dirs_from_args..
2016-12-27 15:28:56 +01:00
Loïc Estève
c5f0b751f4
Improve error message when pytest.warns fail
...
The error message contains the expected type of warnings and the
warnings that were captured. Add tests.
2016-12-20 13:45:39 +01:00
Bruno Oliveira
caee5ce489
Avoid importing asyncio directly because that in turn initializes logging ( #8 )
2016-12-13 21:54:20 -02:00
Bruno Oliveira
45eb9b566c
Move compat tests to a single file using testdir
...
This avoids having to resort to skipping modules in conftest.py file and avoids flake8 errors
2016-12-13 21:28:07 -02:00
Dmitry Malinovsky
3a59acf69f
Use inspect to properly detect generators. Fixes #2129
2016-12-11 21:59:11 +06:00
Bruno Oliveira
57c4489916
Use a simple ``+-`` ASCII string in the string representation of pytest.approx In Python 2
...
Fix #2111
2016-12-02 20:01:53 -02:00
Bruno Oliveira
81528ea81f
Remove hook proxy cache
...
Fix #2016
2016-12-02 07:32:11 -02:00
Bruno Oliveira
bc0f7e6243
Fix false-positive assert rewrite warnings when using 'pytest_plugins'
...
pytest would emit false positive warnings about assertion-rewrite when a
module appears multiple times in plugins which depend
on other plugins using the 'pytest_plugins' mechanism
2016-12-01 15:50:08 -02:00
Luke Murphy
c856537e71
Add warning for incorrect passing args to `-o`.
2016-12-01 13:20:42 +01:00
Bruno Oliveira
669332b7e0
Merge pull request #2101 from wheerd/doctest-encoding
...
Added doctest encoding command line option
2016-11-30 17:43:42 -02:00
Luke Murphy
f5afd8cb54
Add missing `__test__` check for test discovery.
2016-11-30 17:05:42 +01:00
Manuel Krebber
f8fef07b4c
Fixed the tests for python 2.6
2016-11-30 14:19:07 +01:00
Manuel Krebber
c043bbb854
Changed the doctest_encoding option to an ini option.
...
Parametrized the tests for it.
2016-11-30 11:43:33 +01:00
Manuel Krebber
929912de29
Changed the tests to pass on python 2 as well.
2016-11-29 14:51:17 +01:00
Manuel Krebber
d254c6b0ae
Added some tests for --docstring-encoding option. Added option to specify encoding for internal testdir._makefile() for the tests.
2016-11-29 12:29:16 +01:00
Luke Murphy
4e1609b12e
Add `type` validation.
...
Argparse driven argument type validation is added for the
`--junit-xml` and `--confcutdir` arguments.
The commit partially reverts #2080 . Closes #2089 .
2016-11-28 02:16:01 +01:00
Bruno Oliveira
b30a6d22c5
Merge branch 'master' into merge-master-into-features
2016-11-27 17:30:40 -02:00
Luke Murphy
6c5475660a
Add test case for #595 .
...
This new test proves that reports do not capture stdout
by default when skipped.
2016-11-26 18:49:24 +01:00
Bruno Oliveira
33c0b06fdf
Fix error in approx's repr with complex numbers
...
Fix #2082
2016-11-24 15:33:12 -02:00
Bruno Oliveira
629d8e9fd6
Show an error if --confcutdir is not a valid directory
...
Fixes #2078
2016-11-23 09:49:11 -02:00
Ronny Pfannschmidt
a5b5090c72
Merge pull request #2070 from nedbat/bug2038
...
Don't fail if imp can't find the source for a .pyc file. #2038
2016-11-22 17:45:29 +01:00
Bruno Oliveira
bd343ef757
Merge remote-tracking branch 'upstream/features' into integrate-pytest-warnings
2016-11-22 14:35:39 -02:00
Bruno Oliveira
5ce551e469
Merge pull request #2075 from pytest-dev/master
...
Merge master into features after fixing flake8 errors
2016-11-22 14:10:31 -02:00
Bruno Oliveira
26ca5a702e
Add tests and integrated the original code into the core
2016-11-21 08:26:43 -02: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
Ned Batchelder
06bb61bbe3
Don't fail if imp can't find the source for a .pyc file. #2038
2016-11-20 13:09:32 -05:00
Bruno Oliveira
6876ba9ba6
Merge pull request #1995 from mattduck/feat/restructure-assert-truncation
...
Restructure truncation of assertion messages
2016-11-13 19:07:35 -02:00
Bruno Oliveira
efc54b2e56
Merge branch 'master' into merge-master-features
2016-11-11 18:56:53 -02:00
Bruno Oliveira
1130b9f742
Fix the stubborn test about cyclic references left by pytest.raises
...
In Python 2, a context manager's __exit__() leaves sys.exc_info with the exception values even when it was supposed
to suppress the exception, so we explicitly call sys.exc_clear() which removes the traceback and allow the object
to be released.
Also updated the test to not depend on the immediate destruction of the object but instead to ensure it is not being
tracked as a cyclic reference.
Fix #1965
2016-11-08 22:20:27 -02:00
Michael Seifert
552c7d4286
added test (thanks @nicoddemus) and added links in Changelog
2016-11-08 22:13:02 -02:00
Dan Wandschneider
e46e653794
Clean up unittest TestCase objects after tests are complete ( #1649 ).
...
Fix #1649
Users of unittest style TestCases will create expensive objects
in setUp. We should clean up TestCase instances that are lying
around so that they don't fill up memory.
2016-11-07 18:32:56 -08:00
Bruno Oliveira
006a901b86
Properly handle exceptions in multiprocessing tasks
...
Fix #1984
2016-11-03 10:48:43 -02:00
Georgy Dyuldin
e2bb4f893b
Fix teardown error message in generated xUnit XML
...
It was "test setup failure" even error happens on test teardown.
2016-11-02 15:50:32 +03:00
Mathieu Clabaut
6f93ffb5d4
Report teardown output on test failure
...
Until now, teardown stdout/stderr output was not reported upon test failure.
However such output is sometime necessary to understand the failure.
fix #442
2016-10-30 09:52:46 +01:00
Ronny Pfannschmidt
e9668d75b8
turn RecordedWarning into a namedtuple
...
fixes #2013
2016-10-24 15:23:53 +02:00
Ronny Pfannschmidt
35d154f580
Merge pull request #2011 from nicoddemus/false-rewrite-warnings
...
Fix false-positive warnings from assertion rewrite hook
2016-10-24 12:19:23 +02:00
Jason R. Coombs
f2c01c5407
Restore pexpect tests and bypass isalive/wait on macOS. Ref #2022 .
2016-10-21 12:36:42 -04:00
Jason R. Coombs
60a347aeb5
Also use flush where wait was called unconditionally
2016-10-21 12:11:35 -04:00
Jason R. Coombs
11ec96a927
Extract child flush as a staticmethod
2016-10-21 12:10:35 -04:00
Bruno Oliveira
9d00615bbf
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2016-10-20 21:51:42 -02:00
Bruno Oliveira
2a2b8cee09
Fix false-positive warnings from assertion rewrite hook
...
Fix #2005
2016-10-20 21:40:57 -02:00
Bruno Oliveira
620b384b69
Fix cmdline help message for custom options with two or more metavars
...
Fix #2004
2016-10-20 20:34:39 -02:00
Matthew Duck
acee88a118
Fix truncation tests: pyruntest() match
...
Fix issue with truncation tests for -vv and CI, where the test for
non-truncated output would return a positive match even on truncated output.
2016-10-16 20:54:51 +01:00
Bruno Oliveira
78eec0d7f8
Handle import errors with non-ascii messages when importing plugins
...
Fix #1998
2016-10-12 18:19:32 -03:00
Matthew Duck
0061d9bd3d
Fix flake8 (unused import, trailng whitespace)
2016-10-11 00:17:15 +01:00
Matthew Duck
b629da424e
Restructure truncation of assertion messages
...
This addresses ref https://github.com/pytest-dev/pytest/issues/1954 .
The current truncation for assertion explanations does not deal with long lines
properly:
- Previously if lines were too long it would display a "-n more lines"
message.
- 999e7c6541
introduced a bug where long lines can
cause index errors if there are < 10 lines.
Extract the truncation logic into its own file and ensure it can deal with
long lines properly.
2016-10-10 23:38:27 +01:00
Bruno Oliveira
a1d446b8e8
Display traceback from Import errors using pytest's short representation
...
Also omit pytest's own modules and internal libraries (py and pluggy) in low verbosity
Fix #1976
2016-10-03 21:46:44 -03:00
Bruno Oliveira
7d66e4eae1
Display full traceback from Import errors when collecting test modules
...
Fix #1976
2016-10-03 20:47:44 -03:00
Bruno Oliveira
336d7900c5
Fix test about pytest.skip message being used at global level
...
Fix #1959
2016-10-01 13:38:52 -03:00
Bruno Oliveira
654af0ba25
Merge remote-tracking branch 'upstream/master' into features
2016-09-26 19:32:53 -03:00
Bruno Oliveira
5e96edd435
Merge pull request #1952 from davidszotten/pdbcls_without_pdb_on_fail
...
Pdbcls without pdb on fail
2016-09-25 20:24:45 -03:00
Tyler Goodlet
6db2f315fa
Explain a bad scope value to the user
2016-09-21 16:40:58 -04:00
David Szotten
d75748ef6f
test for calling set_trace with custom pdb cls
2016-09-21 09:45:26 +00:00
David Szotten
c7b4b8cf6f
test
2016-09-21 09:45:23 +00:00
Lev Maximov
8cba033bbb
added a test
2016-09-20 02:47:59 +07:00
Floris Bruynooghe
887c097f8e
Merge pull request #1951 from mattduck/feat/1512-dict-compare-output
...
Feat/1512 dict compare output
2016-09-19 17:34:09 +01:00
Floris Bruynooghe
01db0f1cd1
Merge pull request #1923 from RonnyPfannschmidt/mark-internal-value
...
use consistent inner repressentation for marks
2016-09-19 15:30:22 +01:00
Matthew Duck
dd64d823b9
Don't display dict common items if verbosity=1
...
Part one of https://github.com/pytest-dev/pytest/issues/1512 .
If verbosity=1, assertion explanations are truncated at 10 lines. In this
situation, it's more important to tell the user which dictionary items are
different than which are the same.
2016-09-19 15:27:28 +01:00
Floris Bruynooghe
dc16fe2bb9
Merge junit-xml url attribute branch
...
Merge branch 'url_attr' of https://github.com/fushi/pytest into junitxml-url
2016-09-19 12:57:05 +01:00
Bruno Oliveira
04cf5e1df4
Fixed assertion rewriting for plugins in development mode
...
Fix #1934
2016-09-14 21:59:33 -03:00
Ronny Pfannschmidt
10094a3f09
use consistent inner repressentation for marks
2016-09-08 09:52:22 +02:00
Ronny Pfannschmidt
1c9bd9278e
Merge pull request #1913 from flub/builtin-assertion
...
Remove BuiltinAssertionError
2016-09-05 16:53:13 +02:00
Floris Bruynooghe
28b1896e9a
Remove BuiltinAssertionError
...
We used to have this when we where patching the real Python
AssertionError for use with reinterpret, but reinterpret is now
gone so we no longer need this as it is not used by rewrite.
2016-09-05 15:29:09 +02:00
Bruno Oliveira
1e10de574d
The "ids" argument to "parametrize" again accepts unicode strings in Python 2
...
Fixes #1905
2016-09-02 18:38:15 -03:00
mbyt
696a9112be
integrating review commets of @nicoddemus
...
plus small scale refactoring
2016-08-31 22:33:47 +02:00
mbyt
be08223d5a
Merge branch 'master' into disable_tearDown_and_cleanups_for_post_mortem_debugging
...
Conflicts:
CHANGELOG.rst
2016-08-31 20:35:31 +02:00
mbyt
10b3274924
adding corresponding test, authors and changelog
2016-08-31 20:22:54 +02:00
Bruno Oliveira
c8a366e551
Fix issue where pytest_plugins as string was marking wrong modules for rewrite
...
Fix #1888
2016-08-30 22:53:50 -03:00
Ahn Ki-Wook
856ad719d3
Fix UnicodeEncodeError when string comparison with unicode has failed.
2016-08-26 09:41:40 +09:00
John Towler
1b259f70f3
Testcase reports with a url attribute will now properly write this to junitxml
2016-08-25 13:08:51 -07:00
Jordan Guymon
a152ea2dbb
Add buffer attribute to stdin stub
2016-08-24 16:26:34 -07:00
Bruno Oliveira
972a5fb5d5
Improve error message when passing non-string ids to pytest.mark.parametrize
...
Fix #1857
2016-08-23 23:31:45 -03:00
Bruno Oliveira
df200297e2
Fix internal error when parametrizing using and empty list of ids()
...
Fix #1849
2016-08-23 18:18:46 -03:00
Bruno Oliveira
53a0e2b118
Fix code which guesses parametrized scope based on arguments
...
Fix #1832
2016-08-22 21:05:41 -03:00
Bruno Oliveira
6a8160b318
Add acceptance test for module loader
...
Related to #1837
2016-08-22 17:57:25 -03:00
Florian Bruhin
a20c3f9c44
Merge pull request #1827 from blueyed/Fix-spelling-s-outside-a-outside-of-a-
...
Fix spelling: s/outside a/outside of a/
2016-08-20 20:04:58 +02:00
Daniel Hahler
e306a53999
Fix spelling: s/outside a/outside of a/
2016-08-20 18:43:39 +02:00
Bruno Oliveira
63dc71c57e
Fix regression when using importorskip at module level
...
Fix #1822
2016-08-19 18:21:25 -03:00
Bruno Oliveira
3ba475c0f2
Move internal _is_unittest_unexpected_success_a_failure to "compat" module
...
Fix #1815
2016-08-17 22:50:10 -03:00
Bruno Oliveira
463e6572c5
Merge branch 'master' into merge-master-into-features
...
Preparing for 3.0
2016-08-17 22:39:23 -03:00
Bruno Oliveira
224ef67374
Quick fix for tests in config depended on the current directory
...
When running those tests from pytest's root folder, they would
fail because they would end up picking pytest's own pytest.ini
2016-08-17 21:32:05 -03:00
Bruno Oliveira
4ed412eb59
unittest's unexpectedSuccess should work as non-strict xpass
...
Make sure tests for that behavior obtain the same return code
using either pytest or unittest to run the same file
2016-08-17 21:32:04 -03:00
Raphael Pierzina
dfc659f781
Fix sys.version_info expression in xfail marker
2016-08-17 23:32:56 +01:00
Raphael Pierzina
0173952961
Fix py3 xfail expression evaluation and parametrize strict
2016-08-17 23:15:14 +01:00
Raphael Pierzina
767c28d422
Fix broken test in test_junitxml
2016-08-17 22:32:27 +01:00
Raphael Pierzina
d1f2f779ee
Use a better xfail reason
2016-08-17 22:31:56 +01:00
Raphael Pierzina
bb3d6d87b6
Merge branch 'master' into fix-report-outcome-for-xpass
2016-08-17 22:15:29 +01:00
Raphael Pierzina
018197d72a
Fix broken test in test_skipping and add one for strict xfail
2016-08-17 22:14:51 +01:00
Raphael Pierzina
ea379e0e4f
Fix test in test_junitxml and add one for strict
2016-08-17 22:02:54 +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
Florian Bruhin
c8ab79402c
Merge pull request #1811 from nicoddemus/revert-invocation-fixtures
...
Revert invocation-fixtures code
2016-08-17 20:32:54 +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
707b6b5e3f
Revert all invocation-fixtures code
...
Due to a serious regression found in #1794 , it was decided to pull off
invocation features from 3.0 so it can be (hopefully) re-introduced
in 3.1
2016-08-17 08:12:55 -03:00
Bruno Oliveira
f25771a101
Deprecate --resultlog cmdline option
...
Fix #830
2016-08-16 21:40:34 -03:00
Raphael Pierzina
55ec1d7f56
Update test_junitxml.py to interpret XPASS as passed
2016-08-15 23:58:16 +01:00
Bruno Oliveira
ca5957932b
Merge pull request #1806 from blueyed/fix-off-by-one-error-with-warnings
...
Fix off-by-one error with lines from request.node.warn
2016-08-15 19:04:00 -03:00
Daniel Hahler
c163cc7937
Improve display of continuation lines with multiline errors
...
Fixes https://github.com/pytest-dev/pytest/issues/717 .
Follow-up to https://github.com/pytest-dev/pytest/pull/1762 .
2016-08-14 22:34:31 +02:00
Daniel Hahler
16cb5d01b1
Fix off-by-one error with lines from request.node.warn
...
The line numbers in `node.location` seem to be zero-based?!
2016-08-14 22:10:01 +02:00
Daniel Hahler
5b95ee3c19
Pass exitstatus to pytest_terminal_summary hook
...
This is useful to know if a testrun has been interrupted
(EXIT_INTERRUPTED).
2016-08-14 22:06:35 +02:00
Raphael Pierzina
14a4dd0697
Extend test to verify longrepr in stdout
2016-08-12 23:31:38 +01:00
Raphael Pierzina
10a6ed1707
Update unittest test to expect failure for an unexpected success
2016-08-12 23:18:02 +01:00
Christian Boelsen
e4028b4505
Fix #1798 to include errors in total tests in junit xml output.
2016-08-08 13:35:49 +01:00
Floris Bruynooghe
99a4a1a784
Merge pull request #1791 from nicoddemus/ide-integration-1790
...
Internal adjustments for easier integration with IDEs
2016-08-07 23:50:50 +01:00
Bruno Oliveira
802755ceed
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2016-08-06 17:58:17 -03:00
Daniel Hahler
a2891420de
Fix determining rootdir from common_ancestor
2016-08-06 19:35:40 +02:00
Bruno Oliveira
1a79137d04
Add originalname attribute to Function
...
Related to #1790
2016-08-03 22:56:12 -03:00
Bruno Oliveira
ff296fd541
Add capstdout and capstderr attrs to TestReport
...
Related to #1790
2016-08-03 21:49:43 -03:00
Bruno Oliveira
08002ab75a
Add longreprtext property to TestReport objects
...
Related to #1790
2016-08-03 21:49:28 -03:00
Bruno Oliveira
6711b1d6ab
Rewrite asserts in test-modules loaded very early in the startup
...
Also now match modules which start with any of the names registered
using register_assert_rewrite as discussed in #1787
Fix #1784
2016-08-03 12:49:48 -03:00