test_ok2/testing/python
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
..
approx.py Use a simple ``+-`` ASCII string in the string representation of pytest.approx In Python 2 2016-12-02 20:01:53 -02:00
collect.py Ignore errors raised from descriptors when collecting fixtures 2017-02-07 14:27:34 +02:00
fixture.py Fix flake8 E305 and E306 errors 2016-11-20 18:59:15 -02:00
integration.py Fix flake8 E305 and E306 errors 2016-11-20 18:59:15 -02:00
metafunc.py Fix flake8 E305 and E306 errors 2016-11-20 18:59:15 -02:00
raises.py Fix the stubborn test about cyclic references left by pytest.raises 2016-11-08 22:20:27 -02:00
setup_only.py Implement --setup-show cli flag 2016-07-03 22:30:51 +02:00
setup_plan.py Improve commenting for setupplan unittest. 2016-06-25 12:21:31 +02:00
show_fixtures_per_test.py Change format for test function locations 2016-06-12 15:58:32 +01:00