• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pytest-dev / pytest / 2385
51%

Build:
DEFAULT BRANCH: master
Ran 07 Feb 2017 12:34PM UTC
Jobs 1
Files 40
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
2385

Pull #2235

travis-ci

web-flow
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.
Pull Request #2235: Don't execute class properties when collecting Python test classes

1 of 1 new or added line in 1 file covered. (100.0%)

8263 of 8900 relevant lines covered (92.84%)

0.93 hits per line

Jobs
ID Job ID Ran Files Coverage
1 2385.1 (TESTENV=coveralls) 07 Feb 2017 12:34PM UTC 0
92.84
Travis Job 2385.1
Source Files on build 2385
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #2385
  • Pull Request #2235
  • PR Base - master (#2381)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc