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

Alir3z4 / html2text / 526 / 8
97%
master: 97%

Build:
DEFAULT BRANCH: master
Ran 10 Aug 2019 05:20PM UTC
Files 6
Run time 1s
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

10 Aug 2019 05:17PM UTC coverage: 96.913% (-0.007%) from 96.92%
TOXENV=py37

push

travis-ci

jdufresne
Simplify hn() function

The new form:

- Avoids the unnecessary range() call. On Python 2 this avoids building
  the data structure in memory.
- Avoids the try/except block. The comparison is required either way, so
  just do that from the start.
- Always explicitly return as a value. The old form sometimes fell
  through and returned None.

The new version is also slightly faster. Running the function through
Python's timeit showed the following results:

old: 0.6434267910080962
new: 0.40665965899825096

879 of 907 relevant lines covered (96.91%)

0.97 hits per line

Source Files on job 526.8 (TOXENV=py37)
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 503
  • Travis Job 526.8
  • f43c6725 on github
  • Prev Job for TOXENV=py37 on master (#525.8)
  • Next Job for TOXENV=py37 on master (#527.8)
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