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

pytest-dev / pytest-mock / 163

Build:
DEFAULT BRANCH: master
Ran 10 Jun 2016 05:23PM UTC
Jobs 1
Files 1
Run time 0s
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
163

Pull #54

travis-ci

invalid-email-address
Try to import "mock" before "unittest.mock"

I have hit a bug in mock that is fixed in the version of mock included
with Python 3.5.1 but present in 3.3.5 (fixed indirectly in
testing-cabal/mock@eba505cf3e). I can install the fixed "mock" package from
PyPI, but because `pytest_mock` only uses `unittest.mock` for Python
3.3+, the fixed package has no effect.

Instead of trying to check versions, I take the EAFP approach and just
try to import `mock` and fall back to `unittest.mock`. It is possible
that an old version of "mock" could be installed with a newer Python,
but that seems easier to fix than the reverse.
Pull Request #54: Try to import "mock" before "unittest.mock"

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

128 of 128 relevant lines covered (100.0%)

1.0 hits per line

Jobs
ID Job ID Ran Files Coverage
1 163.1 10 Jun 2016 05:23PM UTC 0
100.0
Travis Job 163.1
Source Files on build 163
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #163
  • Pull Request #54
  • PR Base - master (#160)
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