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

hypothesis / h / 8996
70%
master: 97%

Build:
Build:
LAST BUILD BRANCH: realtime-update-v1-h-only-1
DEFAULT BRANCH: master
Ran 05 Nov 2015 07:19PM UTC
Jobs 1
Files 89
Run time 19s
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
8996

push

travis-ci

seanh
Add AnnotationHTMLPresenter

This splits h.api.models.Annotation into two classes:

1. h.api.models.Annotation, which contains only model code and no presentation
   code.

   This _does_ contain code for papering over the variability of our annotation
   data. For example it has a .uri property that always returns a unicode
   string even if the underlying annotation dict has no "uri" key or has a key
   whose value isn't a string.

2. h.AnnotationHTMLPresenter, a wrapper class for h.api.models.Annotation that:

   a. Overrides some properties with HTML-specific behaviour.
      For example it overrides .uri to provide an HTML-escaped copy.

   b. Adds some new HTML-specific properties. For example it adds a
      .document_link property that returns an escaped, HTML-formatted link
      for the annotation's document.

Many Annotation tests are now moved to AnnotationHTMLPresenter tests.

feed/atom.py, feeds/rss.py and groups/views.py are updated to use
AnnotationHTMLPresenter.

Tests for these modules need to be updated to mock AnnotationHTMLPresenter
behaviour, which is unfortunately quite awkward and requires a mock class.

108 of 108 new or added lines in 5 files covered. (100.0%)

2608 of 3715 relevant lines covered (70.2%)

0.7 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
4
100.0
h/presenters.py

Uncovered Existing Lines

Lines Coverage ∆ File
1
100.0
h/feeds/atom.py
1
100.0
h/feeds/rss.py
7
100.0
h/api/models.py
8
100.0
h/groups/views.py
Jobs
ID Job ID Ran Files Coverage
1 8996.1 05 Nov 2015 07:19PM UTC 0
70.2
Travis Job 8996.1
Source Files on build 8996
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #8996
  • ddd68f90 on github
  • Prev Build on annotation-html-presenter (#8959)
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