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

collective / sphinxcontrib-httpexample / 7956650462

pending completion
7956650462

push

github

web-flow
Merge pull request #92 from collective/plone-javascript

 Added new tab to display JavaScript client method for plone

418 of 445 relevant lines covered (93.93%)

0.94 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

95.65
/src/sphinxcontrib/httpexample/__init__.py
1
# -*- coding: utf-8 -*-
2
from sphinxcontrib.httpexample.directives import HTTPExample
4✔
3

4
import os
4✔
5
import pkg_resources
4✔
6
import shutil
4✔
7

8

9
CSS_FILE = 'sphinxcontrib-httpexample.css'
4✔
10
JS_FILE = 'sphinxcontrib-httpexample.js'
4✔
11

12

13
def copy_assets(app, exception):
4✔
14
    if app.builder.name != 'html' or exception:
4✔
15
        return
×
16

17
    # CSS
18
    src = os.path.join(os.path.dirname(__file__), 'static', CSS_FILE)
4✔
19
    dst = os.path.join(app.builder.outdir, '_static', CSS_FILE)
4✔
20
    shutil.copyfile(src, dst)
4✔
21

22
    # JS
23
    src = os.path.join(os.path.dirname(__file__), 'static', JS_FILE)
4✔
24
    dst = os.path.join(app.builder.outdir, '_static', JS_FILE)
4✔
25
    shutil.copyfile(src, dst)
4✔
26

27

28
def setup(app):
4✔
29
    app.connect('build-finished', copy_assets)
4✔
30
    app.add_directive_to_domain('http', 'example', HTTPExample)
4✔
31
    app.add_js_file(JS_FILE)
4✔
32
    app.add_css_file(CSS_FILE)
4✔
33
    app.add_config_value('httpexample_scheme', 'http', 'html')
4✔
34
    dist = pkg_resources.get_distribution('sphinxcontrib-httpexample')
4✔
35
    return {'version': dist.version}
4✔
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