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

ionelmc / python-manhole / 268 / 50
86%
master: 86%

Build:
DEFAULT BRANCH: master
Ran 28 Oct 2014 01:30AM UTC
Files 1
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

27 Oct 2014 11:06PM UTC coverage: 94.62% (-0.07%) from 94.688%
TOXENV=3.4,coveralls

push

travis-ci

ionelmc
Cleanup _get_original

The previous code had few issues:

- We try to import possibly non-exiting modules on each call, which is
  expensive, looking up the the module in the entire import path. This
  is also pointless since the module is not expected to appear after we
  found that it was not available.

- Do pointless lookups, becuase older lookups overwrite previous
  lookups. For example, if gevent is available, we would lookup twice,
  overwriting the pure Python lookup with gevent lookup. If both gevent
  and eventlet are available, we would do 3 lookups and return the
  eventlet lookup.

- Check for SynatxError on import looks wrong. I could not find the
  code that raise this in the gevent and evetlet.

- _get_original interface was strage, accepting a string, instead of
  the expected module and name arguemtns, as used by
  gevent.monkey.get_original.

Now we use simpler and more efficient solution:

- We try to import eventlet or gevent only once
- We define _get_original either using eventlet, gevent or our
  implementaion.
- We do only single lookup per call
- _get_original accpets module and name arguments

299 of 316 relevant lines covered (94.62%)

0.95 hits per line

Source Files on job 268.50 (TOXENV=3.4,coveralls)
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 268
  • Travis Job 268.50
  • e6764642 on github
  • Prev Job for TOXENV=3.4,coveralls on master (#267.50)
  • Next Job for TOXENV=3.4,coveralls on master (#269.50)
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