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

Alir3z4 / html2text / 526
97%

Build:
DEFAULT BRANCH: master
Ran 10 Aug 2019 05:18PM UTC
Jobs 10
Files 6
Run time 3min
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
526

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

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

885 of 907 relevant lines covered (97.57%)

6.78 hits per line

Jobs
ID Job ID Ran Files Coverage
1 526.1 (TOXENV=black) 10 Aug 2019 05:18PM UTC 0
Travis Job 526.1
2 526.2 (TOXENV=flake8) 10 Aug 2019 05:18PM UTC 0
Travis Job 526.2
3 526.3 (TOXENV=isort) 10 Aug 2019 05:18PM UTC 0
Travis Job 526.3
4 526.4 (TOXENV=py27) 10 Aug 2019 05:19PM UTC 0
96.8
Travis Job 526.4
5 526.5 (TOXENV=py34) 10 Aug 2019 05:19PM UTC 0
96.8
Travis Job 526.5
6 526.6 (TOXENV=py35) 10 Aug 2019 05:20PM UTC 0
96.91
Travis Job 526.6
7 526.7 (TOXENV=py36) 10 Aug 2019 05:20PM UTC 0
96.91
Travis Job 526.7
8 526.8 (TOXENV=py37) 10 Aug 2019 05:20PM UTC 0
96.91
Travis Job 526.8
9 526.9 (TOXENV=pypy) 10 Aug 2019 05:21PM UTC 0
96.91
Travis Job 526.9
10 526.10 (TOXENV=pypy3) 10 Aug 2019 05:22PM UTC 0
96.91
Travis Job 526.10
Source Files on build 526
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #526
  • f43c6725 on github
  • Prev Build on master (#525)
  • Next Build on master (#527)
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