summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2009-12-27 20:33:23 -0500
committerNed Batchelder <ned@nedbatchelder.com>2009-12-27 20:33:23 -0500
commit291ec95b6c17c28371280e7dcde58b1cc9dd6a82 (patch)
tree17ec0b71e4f097f244bd20bcb319ea23043fc2d9
parent8a06359bee567f563b561699350731433264f928 (diff)
downloadpython-coveragepy-git-291ec95b6c17c28371280e7dcde58b1cc9dd6a82.tar.gz
Remove some redundancy in the farm tests.
--HG-- rename : test/farm/html/run_x_xml.py => test/farm/html/run_a_xml.py
-rw-r--r--test/farm/html/gold_x_xml/coverage.xml2
-rw-r--r--test/farm/html/run_a.py1
-rw-r--r--test/farm/html/run_a_xml.py (renamed from test/farm/html/run_x_xml.py)5
-rw-r--r--test/farm/html/src/x.py7
4 files changed, 5 insertions, 10 deletions
diff --git a/test/farm/html/gold_x_xml/coverage.xml b/test/farm/html/gold_x_xml/coverage.xml
index 8c009f5d..37027efb 100644
--- a/test/farm/html/gold_x_xml/coverage.xml
+++ b/test/farm/html/gold_x_xml/coverage.xml
@@ -6,7 +6,7 @@
<packages>
<package branch-rate="0.0" complexity="0.0" line-rate="0.666666666667" name=".">
<classes>
- <class branch-rate="0.0" complexity="0.0" filename="x.py" line-rate="0.666666666667" name="x">
+ <class branch-rate="0.0" complexity="0.0" filename="a.py" line-rate="0.666666666667" name="a">
<methods/>
<lines>
<line hits="1" number="3"/>
diff --git a/test/farm/html/run_a.py b/test/farm/html/run_a.py
index 047d8982..92d02348 100644
--- a/test/farm/html/run_a.py
+++ b/test/farm/html/run_a.py
@@ -4,6 +4,7 @@ def html_it():
cov = coverage.coverage()
cov.start()
import a
+ reload(a) # Because other test files import a, we have to reload to run it.
cov.stop()
cov.html_report(a, directory="../html_a")
diff --git a/test/farm/html/run_x_xml.py b/test/farm/html/run_a_xml.py
index fe9cefa7..375be2af 100644
--- a/test/farm/html/run_x_xml.py
+++ b/test/farm/html/run_a_xml.py
@@ -3,9 +3,10 @@ def html_it():
import coverage
cov = coverage.coverage()
cov.start()
- import x
+ import a
+ reload(a) # Because other test files import a, we have to reload to run it.
cov.stop()
- cov.xml_report(x, outfile="../xml/coverage.xml")
+ cov.xml_report(a, outfile="../xml/coverage.xml")
import os
if not os.path.exists("xml"):
diff --git a/test/farm/html/src/x.py b/test/farm/html/src/x.py
deleted file mode 100644
index 9e71aebd..00000000
--- a/test/farm/html/src/x.py
+++ /dev/null
@@ -1,7 +0,0 @@
-# A test file for HTML reporting by coverage.
-
-if 1 < 2:
- # Needed a < to look at HTML entities.
- a = 3
-else:
- a = 4