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

hypothesis / h / 8918
70%
master: 97%

Build:
Build:
LAST BUILD BRANCH: realtime-update-v1-h-only-1
DEFAULT BRANCH: master
Ran 30 Oct 2015 02:45PM UTC
Jobs 1
Files 88
Run time 13s
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
8918

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.

109 of 109 new or added lines in 6 files covered. (100.0%)

2607 of 3749 relevant lines covered (69.54%)

0.7 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
4
100.0
h/annotation_html_presenter.py
Jobs
ID Job ID Ran Files Coverage
1 8918.1 30 Oct 2015 02:45PM UTC 0
69.54
Travis Job 8918.1
Source Files on build 8918
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #8918
  • 78f95d68 on github
  • Next Build on annotation-html-presenter (#8920)
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