test_ok1/testing
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
..
code Fix test_excinfo_getstatement that broke because of whitespace changes 2016-11-20 19:12:42 -02:00
freeze Use PyInstaller for freeze test env 2016-07-26 22:02:37 -03:00
python Ignore errors raised from descriptors when collecting fixtures 2017-02-07 14:27:34 +02:00
acceptance_test.py Display full traceback from Import errors when collecting test modules 2016-10-03 20:47:44 -03:00
deprecated_test.py Merge pull request #1813 from nicoddemus/pytest-setup.cfg 2016-08-17 20:33:57 +02:00
test_argcomplete.py Remove code related to support python <= 2.5 2015-12-16 16:16:22 -02:00
test_assertion.py Assert statements of the pytester plugin again benefit from assertion rewriting 2017-01-19 21:33:51 -02:00
test_assertrewrite.py Consider plugins loaded by PYTEST_PLUGINS for assertion rewrite 2017-01-11 17:15:16 -02:00
test_cache.py LastFailed now creates .cache only when needed. Fixes #1342 2016-02-16 11:42:04 +06:00
test_capture.py Add buffer attribute to stdin stub 2016-08-24 16:26:34 -07:00
test_collection.py Fix flake8 E305 and E306 errors 2016-11-20 18:59:15 -02:00
test_compat.py Avoid importing asyncio directly because that in turn initializes logging (#8) 2016-12-13 21:54:20 -02:00
test_config.py Refactor plugin specs handling into an isolated function 2017-01-12 14:31:35 -02:00
test_conftest.py Remove hook proxy cache 2016-12-02 07:32:11 -02:00
test_doctest.py Move module error compatibility code to _pytest.compat 2016-12-27 22:01:22 -02: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 Add `type` validation. 2016-11-28 02:16:01 +01:00
test_mark.py Fix flake8 E305 and E306 errors 2016-11-20 18:59:15 -02:00
test_monkeypatch.py Switch monkeypatch fixture to yield syntax 2017-01-04 15:06:52 -08:00
test_nose.py Fix flake8 E305 and E306 errors 2016-11-20 18:59:15 -02:00
test_parseopt.py Fix flake8 E305 and E306 errors 2016-11-20 18:59:15 -02:00
test_pastebin.py Fix flake8 E305 and E306 errors 2016-11-20 18:59:15 -02:00
test_pdb.py Fix flake8 E305 and E306 errors 2016-11-20 18:59:15 -02:00
test_pluginmanager.py Remove hook proxy cache 2016-12-02 07:32:11 -02:00
test_pytester.py Fail assert_outcomes() on missing terminal report 2017-01-11 17:09:37 +02:00
test_recwarn.py Improve error message when pytest.warns fail 2016-12-20 13:45:39 +01:00
test_resultlog.py Raise CollectError if pytest.skip() is called during collection 2016-06-24 20:56:21 +02:00
test_runner.py Fix flake8 E305 and E306 errors 2016-11-20 18:59:15 -02:00
test_runner_xunit.py setup_* and teardown_* functions argument now optional 2016-07-14 23:41:40 -03:00
test_session.py add test for --maxfail=NUM overiding -x 2016-07-20 17:20:10 +02:00
test_skipping.py Test for `pytest.mark.xfail` with non-Python Item 2017-02-03 17:13:05 +01:00
test_terminal.py Report teardown output on test failure 2016-10-30 09:52:46 +01:00
test_tmpdir.py Add deprecation module to centralize deprecation messages and bits of code 2016-07-25 18:14:39 -03:00
test_unittest.py Clean up unittest TestCase objects after tests are complete (#1649). 2016-11-07 18:32:56 -08:00