File tree Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 1
- from . plugin import Plugin
1
+ """Django Template Coverage Plugin"""
2
2
3
- # silence pyflakes
4
- Plugin
3
+ from .plugin import DjangoTemplatePlugin
4
+
5
+
6
+ def coverage_init (reg , options ):
7
+ reg .add_file_tracer (DjangoTemplatePlugin ())
Original file line number Diff line number Diff line change @@ -39,10 +39,12 @@ def read_template_source(filename):
39
39
return text
40
40
41
41
42
- class Plugin (coverage .plugin .CoveragePlugin , coverage .plugin .FileTracer ):
42
+ class DjangoTemplatePlugin (
43
+ coverage .plugin .CoveragePlugin ,
44
+ coverage .plugin .FileTracer ,
45
+ ):
43
46
44
- def __init__ (self , options ):
45
- super (Plugin , self ).__init__ (options )
47
+ def __init__ (self ):
46
48
self .django_template_dir = os .path .realpath (
47
49
os .path .dirname (django .template .__file__ )
48
50
)
Original file line number Diff line number Diff line change 21
21
django17: Django >=1.7, <1.8
22
22
django18: Django >=1.8, <1.9
23
23
six >= 1.4.0
24
- coverage >= 4.0a6
24
+ coverage >= 4.0a7
25
25
26
26
commands =
27
27
{envpython} -c " import tests.banner"
You can’t perform that action at this time.
0 commit comments