pytest2/testing
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
..
code New-style classes implemented for python 2.7 - #2147 2017-02-16 20:28:17 +01:00
freeze Use PyInstaller for freeze test env 2016-07-26 22:02:37 -03:00
python New-style classes implemented for python 2.7 - #2147 2017-02-16 20:28:17 +01:00
acceptance_test.py New-style classes implemented for python 2.7 - #2147 2017-02-16 20:28:17 +01:00
deprecated_test.py New-style classes implemented for python 2.7 - #2147 2017-02-16 20:28:17 +01:00
test_argcomplete.py New-style classes implemented for python 2.7 - #2147 2017-02-16 20:28:17 +01:00
test_assertion.py New-style classes implemented for python 2.7 - #2147 2017-02-16 20:28:17 +01:00
test_assertrewrite.py New-style classes implemented for python 2.7 - #2147 2017-02-16 20:28:17 +01:00
test_cache.py New-style classes implemented for python 2.7 - #2147 2017-02-16 20:28:17 +01:00
test_capture.py New-style classes implemented for python 2.7 - #2147 2017-02-16 20:28:17 +01:00
test_collection.py New-style classes implemented for python 2.7 - #2147 2017-02-16 20:28:17 +01:00
test_compat.py fixes #2208 by introducing a iteration limit 2017-01-19 11:38:15 +01:00
test_config.py New-style classes implemented for python 2.7 - #2147 2017-02-16 20:28:17 +01:00
test_conftest.py New-style classes implemented for python 2.7 - #2147 2017-02-16 20:28:17 +01:00
test_doctest.py New-style classes implemented for python 2.7 - #2147 2017-02-16 20:28:17 +01:00
test_entry_points.py Add tests to make sure expected entry points exist (#1629) 2016-06-22 14:28:53 +02:00
test_helpconfig.py Introduce pytest command as recommended entry point 2016-06-21 16:16:57 +02:00
test_junitxml.py New-style classes implemented for python 2.7 - #2147 2017-02-16 20:28:17 +01:00
test_mark.py New-style classes implemented for python 2.7 - #2147 2017-02-16 20:28:17 +01:00
test_monkeypatch.py New-style classes implemented for python 2.7 - #2147 2017-02-16 20:28:17 +01:00
test_nose.py New-style classes implemented for python 2.7 - #2147 2017-02-16 20:28:17 +01:00
test_parseopt.py New-style classes implemented for python 2.7 - #2147 2017-02-16 20:28:17 +01:00
test_pastebin.py New-style classes implemented for python 2.7 - #2147 2017-02-16 20:28:17 +01:00
test_pdb.py New-style classes implemented for python 2.7 - #2147 2017-02-16 20:28:17 +01:00
test_pluginmanager.py New-style classes implemented for python 2.7 - #2147 2017-02-16 20:28:17 +01:00
test_pytester.py New-style classes implemented for python 2.7 - #2147 2017-02-16 20:28:17 +01:00
test_recwarn.py allow error message matching in pytest.raises 2017-02-02 19:52:33 +01:00
test_resultlog.py New-style classes implemented for python 2.7 - #2147 2017-02-16 20:28:17 +01:00
test_runner.py New-style classes implemented for python 2.7 - #2147 2017-02-16 20:28:17 +01:00
test_runner_xunit.py New-style classes implemented for python 2.7 - #2147 2017-02-16 20:28:17 +01:00
test_session.py New-style classes implemented for python 2.7 - #2147 2017-02-16 20:28:17 +01:00
test_skipping.py New-style classes implemented for python 2.7 - #2147 2017-02-16 20:28:17 +01:00
test_terminal.py New-style classes implemented for python 2.7 - #2147 2017-02-16 20:28:17 +01:00
test_tmpdir.py New-style classes implemented for python 2.7 - #2147 2017-02-16 20:28:17 +01:00
test_unittest.py New-style classes implemented for python 2.7 - #2147 2017-02-16 20:28:17 +01:00
test_warnings.py Use warnings.catch_warnings instead of WarningsRecorder 2017-02-18 13:08:14 -02:00