test_ok2/_pytest
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 Remove unused import 2016-11-30 22:34:02 -02:00
assertion Fix typo in docstring of register_assert_rewrite 2016-12-02 09:22:47 -02:00
vendored_packages Vendor pluggy 0.4.0 2016-09-25 23:36:02 -03:00
__init__.py bump version to next dev 2017-01-22 22:21:08 +01:00
_argcomplete.py Fix flake8 E305 and E306 errors 2016-11-20 18:59:15 -02:00
_pluggy.py Create `_pytest.vendored_packages` and _pytest._pluggy 2015-09-07 13:01:54 -03:00
cacheprovider.py Use testscollected to make xdist happy 2016-03-11 14:48:17 +06:00
capture.py Fix flake8 E305 and E306 errors 2016-11-20 18:59:15 -02:00
compat.py Merge pull request #2136 from hroncok/i2132 2016-12-27 23:10:58 -02:00
config.py Assert statements of the pytester plugin again benefit from assertion rewriting 2017-01-19 21:33:51 -02:00
debugging.py Fix flake8 E305 and E306 errors 2016-11-20 18:59:15 -02:00
deprecated.py Merge pull request #1813 from nicoddemus/pytest-setup.cfg 2016-08-17 20:33:57 +02:00
doctest.py Fix use of deprecated getfuncargvalue method in the internal doctest plugin 2016-09-01 07:19:11 -04:00
fixtures.py Ignore errors raised from descriptors when collecting fixtures 2017-02-07 14:27:34 +02:00
freeze_support.py Move the freezing function from genscript.py to a new module freeze_support.py 2016-06-26 19:37:24 +02:00
helpconfig.py Add warning for incorrect passing args to `-o`. 2016-12-01 13:20:42 +01:00
hookspec.py Pass exitstatus to pytest_terminal_summary hook 2016-08-14 22:06:35 +02:00
impl - enhance ordering of tests using parametrized resources 2012-08-01 09:07:32 +02:00
junitxml.py Add `type` validation. 2016-11-28 02:16:01 +01:00
main.py remove unused import 2017-01-20 12:09:49 +01:00
mark.py Fix flake8 E305 and E306 errors 2016-11-20 18:59:15 -02:00
monkeypatch.py Switch monkeypatch fixture to yield syntax 2017-01-04 15:06:52 -08:00
nose.py adapt to pluggy naming, rename pytest.hookspec_opts to pytest.hookspec,s ame with hookimpl_opts 2015-05-06 10:08:08 +02:00
pastebin.py Fix flake8 E305 and E306 errors 2016-11-20 18:59:15 -02:00
pytester.py Merge branch 'master' into trial-envs 2017-01-20 08:37:34 -02:00
python.py Replace 'raise StopIteration' usages in the code by 'return's in accordance to PEP-479 2017-02-01 02:37:55 -02:00
recwarn.py Improve error message when pytest.warns fail 2016-12-20 13:45:39 +01:00
resultlog.py Deprecate --resultlog cmdline option 2016-08-16 21:40:34 -03:00
runner.py Fix flake8 E305 and E306 errors 2016-11-20 18:59:15 -02:00
setuponly.py minor: fix grammar with help for --setup-{only,show} 2016-11-28 21:33:15 +01:00
setupplan.py Fix PEP-8. 2016-07-03 22:33:21 +02:00
skipping.py Merge pull request #2232 from vidartf/patch-1 2017-02-03 21:39:42 -02:00
terminal.py Report teardown output on test failure 2016-10-30 09:52:46 +01:00
tmpdir.py Fix flake8 E305 and E306 errors 2016-11-20 18:59:15 -02:00
unittest.py Fix flake8 E305 and E306 errors 2016-11-20 18:59:15 -02:00