Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ contributions by:
Jessamyn Smith
Simon Charette
Pamela McA'Nulty
Emil Madsen
10 changes: 10 additions & 0 deletions django_coverage_plugin/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from __future__ import print_function

import os.path
import re
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is now unused.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course, I've just suggested putting it back (wince)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops. Missed that conversation, sorry! 👍

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, my conversation came after your reasonable comment. :)


from six.moves import range

Expand Down Expand Up @@ -162,6 +163,15 @@ def file_tracer(self, filename):
def file_reporter(self, filename):
return FileReporter(filename)

def find_executable_files(self, src_dir):
for (dirpath, dirnames, filenames) in os.walk(src_dir):
for filename in filenames:
# We're only interested in files that look like reasonable HTML
# files: Must end with .htm or .html, and must not have certain
# funny characters that probably mean they are editor junk.
if re.match(r"^[^.#~!$@%^&*()+=,]+\.html?$", filename):
yield os.path.join(dirpath, filename)

# --- FileTracer methods

def has_dynamic_source_filename(self):
Expand Down