Description: Refactor handling of static report files to a separate function.
Origin: Created for ease of custom packaging changes for duplicate libraries.
Author: Ben Finney <ben+debian@benfinney.id.au>
Last-Update: 2011-07-27
diff -r 25f2c1579f1c -r 609f75d136a3 coverage/html.py
--- a/coverage/html.py Sun Sep 19 16:42:27 2010 -0400
+++ b/coverage/html.py Wed Jul 27 13:28:51 2011 +1000
@@ -50,10 +50,13 @@
# Write the index file.
self.index_file()
- # Create the once-per-directory files.
+ self.make_local_static_report_files()
+
+ def make_local_static_report_files(self):
+ """ Make local instances of static files for HTML report. """
for static in [
"style.css", "coverage_html.js",
- "jquery-1.3.2.min.js", "jquery.tablesorter.min.js"
+ "jquery-1.3.2.min.js", "jquery-tablesorter.min.js",
]:
shutil.copyfile(
data_filename("htmlfiles/" + static),