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

hypothesis / h / 8922 / 1
70%
master: 97%

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

30 Oct 2015 02:59PM UTC coverage: 69.539% (+0.009%) from 69.53%
8922.1

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.

2607 of 3749 relevant lines covered (69.54%)

0.7 hits per line

Source Files on job 8922.1
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 8922
  • Travis Job 8922.1
  • 0378f0e6 on github
  • Prev Job for on annotation-html-presenter (#8920.1)
  • Next Job for on annotation-html-presenter (#8959.1)
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