summaryrefslogtreecommitdiff
path: root/tests/farm/html
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2015-06-13 14:19:45 -0400
committerNed Batchelder <ned@nedbatchelder.com>2015-06-13 14:19:45 -0400
commitf9a5b120b91e62f86bcd12e54a92fda675534200 (patch)
treee5cc74f7da3d4220c3c313736f613c6c2e0b9638 /tests/farm/html
parent57ee6c36690e62698165e84d40614aa4f2cb7dc5 (diff)
downloadpython-coveragepy-git-f9a5b120b91e62f86bcd12e54a92fda675534200.tar.gz
Change FileLocator from a class to module-level functions
Diffstat (limited to 'tests/farm/html')
-rw-r--r--tests/farm/html/run_a_xml_1.py4
-rw-r--r--tests/farm/html/run_a_xml_2.py4
-rw-r--r--tests/farm/html/run_y_xml_branch.py4
3 files changed, 6 insertions, 6 deletions
diff --git a/tests/farm/html/run_a_xml_1.py b/tests/farm/html/run_a_xml_1.py
index 593beae2..eec66174 100644
--- a/tests/farm/html/run_a_xml_1.py
+++ b/tests/farm/html/run_a_xml_1.py
@@ -2,14 +2,14 @@ source_path = None
def html_it():
"""Run coverage and make an XML report for a."""
- import coverage
+ import coverage, coverage.files
cov = coverage.coverage()
cov.start()
import a # pragma: nested
cov.stop() # pragma: nested
cov.xml_report(a, outfile="../xml_1/coverage.xml")
global source_path
- source_path = cov.file_locator.relative_dir.rstrip('/')
+ source_path = coverage.files.relative_directory().rstrip('/')
import os
if not os.path.exists("xml_1"):
diff --git a/tests/farm/html/run_a_xml_2.py b/tests/farm/html/run_a_xml_2.py
index 4d691b3b..081c8aa3 100644
--- a/tests/farm/html/run_a_xml_2.py
+++ b/tests/farm/html/run_a_xml_2.py
@@ -2,14 +2,14 @@ source_path = None
def html_it():
"""Run coverage and make an XML report for a."""
- import coverage
+ import coverage, coverage.files
cov = coverage.coverage(config_file="run_a_xml_2.ini")
cov.start()
import a # pragma: nested
cov.stop() # pragma: nested
cov.xml_report(a)
global source_path
- source_path = cov.file_locator.relative_dir.rstrip('/')
+ source_path = coverage.files.relative_directory().rstrip('/')
import os
if not os.path.exists("xml_2"):
diff --git a/tests/farm/html/run_y_xml_branch.py b/tests/farm/html/run_y_xml_branch.py
index 59228077..b26f3af8 100644
--- a/tests/farm/html/run_y_xml_branch.py
+++ b/tests/farm/html/run_y_xml_branch.py
@@ -2,14 +2,14 @@ source_path = None
def xml_it():
"""Run coverage and make an XML report for y."""
- import coverage
+ import coverage, coverage.files
cov = coverage.coverage(branch=True)
cov.start()
import y # pragma: nested
cov.stop() # pragma: nested
cov.xml_report(y, outfile="../xml_branch/coverage.xml")
global source_path
- source_path = cov.file_locator.relative_dir.rstrip('/')
+ source_path = coverage.files.relative_directory().rstrip('/')
import os
if not os.path.exists("xml_branch"):