summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--coverage/data.py8
-rw-r--r--coverage/debug.py3
-rw-r--r--tests/coveragetest.py7
-rw-r--r--tests/test_farm.py5
4 files changed, 1 insertions, 22 deletions
diff --git a/coverage/data.py b/coverage/data.py
index 15d0a273..5e85fc10 100644
--- a/coverage/data.py
+++ b/coverage/data.py
@@ -15,7 +15,6 @@ import socket
from coverage import env
from coverage.backward import iitems, string_class
-from coverage.debug import _TEST_NAME_FILE
from coverage.files import PathAliases
from coverage.misc import CoverageException, file_be_gone, isolate_module
@@ -451,13 +450,8 @@ class CoverageJsonData(object):
# plenty of distinguishing information. We do this here in
# `save()` at the last minute so that the pid will be correct even
# if the process forks.
- extra = ""
- if _TEST_NAME_FILE: # pragma: debugging
- with open(_TEST_NAME_FILE) as f:
- test_name = f.read()
- extra = "." + test_name
dice = random.Random(os.urandom(8)).randint(0, 999999)
- suffix = "%s%s.%s.%06d" % (socket.gethostname(), extra, os.getpid(), dice)
+ suffix = "%s.%s.%06d" % (socket.gethostname(), os.getpid(), dice)
if suffix:
filename += "." + suffix
diff --git a/coverage/debug.py b/coverage/debug.py
index fd27c731..f491a0f7 100644
--- a/coverage/debug.py
+++ b/coverage/debug.py
@@ -24,9 +24,6 @@ os = isolate_module(os)
# This is a list of forced debugging options.
FORCED_DEBUG = []
-# A hack for debugging testing in sub-processes.
-_TEST_NAME_FILE = "" # "/tmp/covtest.txt"
-
class DebugControl(object):
"""Control and output for debugging."""
diff --git a/tests/coveragetest.py b/tests/coveragetest.py
index 94f50852..9814d648 100644
--- a/tests/coveragetest.py
+++ b/tests/coveragetest.py
@@ -24,7 +24,6 @@ from coverage import env
from coverage.backunittest import TestCase, unittest
from coverage.backward import StringIO, import_local_file, string_class, shlex_quote
from coverage.cmdline import CoverageScript
-from coverage.debug import _TEST_NAME_FILE
from coverage.misc import StopEverything
from tests.helpers import run_command, SuperModuleCleaner
@@ -91,12 +90,6 @@ class CoverageTest(
self.last_command_output = None
self.last_module_name = None
- if _TEST_NAME_FILE: # pragma: debugging
- with open(_TEST_NAME_FILE, "w") as f:
- f.write("%s_%s" % (
- self.__class__.__name__, self._testMethodName,
- ))
-
def clean_local_file_imports(self):
"""Clean up the results of calls to `import_local_file`.
diff --git a/tests/test_farm.py b/tests/test_farm.py
index 942bdd5c..54eeb499 100644
--- a/tests/test_farm.py
+++ b/tests/test_farm.py
@@ -20,7 +20,6 @@ from tests.backtest import execfile # pylint: disable=redefined-builtin
from coverage import env
from coverage.backunittest import unittest
-from coverage.debug import _TEST_NAME_FILE
# Look for files that become tests.
@@ -105,10 +104,6 @@ class FarmTestCase(ModuleAwareMixin, SysPathAwareMixin, unittest.TestCase):
def __call__(self): # pylint: disable=arguments-differ
"""Execute the test from the runpy file."""
- if _TEST_NAME_FILE: # pragma: debugging
- with open(_TEST_NAME_FILE, "w") as f:
- f.write(self.description.replace("/", "_"))
-
# Prepare a dictionary of globals for the run.py files to use.
fns = """
copy run clean skip