summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2015-04-24 21:03:25 -0400
committerNed Batchelder <ned@nedbatchelder.com>2015-04-24 21:03:25 -0400
commit487a14d375d30a75927051b38fdd211c12910311 (patch)
tree5450779551eaed8520e2aa227330f322dbc0bda1 /tests
parentbaf1bd0d7050625c378f49d4cb815b8d1364caf2 (diff)
downloadpython-coveragepy-git-487a14d375d30a75927051b38fdd211c12910311.tar.gz
A better way to indicate that a tempdir test isn't making any files.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_coverage.py6
-rw-r--r--tests/test_data.py2
2 files changed, 3 insertions, 5 deletions
diff --git a/tests/test_coverage.py b/tests/test_coverage.py
index 35c7c25c..3de381f1 100644
--- a/tests/test_coverage.py
+++ b/tests/test_coverage.py
@@ -1672,7 +1672,7 @@ class ReportingTest(CoverageTest):
# We don't make any temp files, but we need an empty directory to run the
# tests in.
- run_in_temp_dir = True
+ no_files_in_temp_dir = True
def test_no_data_to_report_on_annotate(self):
# Reporting with no data produces a nice message and no output dir.
@@ -1680,10 +1680,6 @@ class ReportingTest(CoverageTest):
self.command_line("annotate -d ann")
self.assert_doesnt_exist("ann")
- # CoverageTest will yell at us for using a temp directory with no files
- # made. Instead of adding a way to shut it up, just make a file.
- self.make_file("touch.txt", "")
-
def test_no_data_to_report_on_html(self):
# Reporting with no data produces a nice message and no output dir.
with self.assertRaisesRegex(CoverageException, "No data to report."):
diff --git a/tests/test_data.py b/tests/test_data.py
index e2f8150b..776f7b59 100644
--- a/tests/test_data.py
+++ b/tests/test_data.py
@@ -165,6 +165,8 @@ class DataTest(DataTestHelpers, CoverageTest):
class DataTestInTempDir(DataTestHelpers, CoverageTest):
"""Test cases for coverage.data."""
+ no_files_in_temp_dir = True
+
def test_combining_from_different_directories(self):
covdata1 = CoverageData()
covdata1.add_line_data(DATA_1)