summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--coverage/cmdline.py4
-rw-r--r--tests/test_cmdline.py16
2 files changed, 0 insertions, 20 deletions
diff --git a/coverage/cmdline.py b/coverage/cmdline.py
index 2ebf7031..c21acda6 100644
--- a/coverage/cmdline.py
+++ b/coverage/cmdline.py
@@ -619,10 +619,6 @@ class CoverageScript(object):
)
return ERR
- if not self.coverage.get_option("run:parallel"):
- if not options.append:
- self.coverage.erase()
-
# Run the script.
self.coverage.start()
code_ran = True
diff --git a/tests/test_cmdline.py b/tests/test_cmdline.py
index b6fad76d..b8a659f1 100644
--- a/tests/test_cmdline.py
+++ b/tests/test_cmdline.py
@@ -358,7 +358,6 @@ class CmdLineTest(BaseCmdLineTest):
# run calls coverage.erase first.
self.cmd_executes("run foo.py", """\
.Coverage()
- .erase()
.start()
.run_python_file('foo.py', ['foo.py'])
.stop()
@@ -386,7 +385,6 @@ class CmdLineTest(BaseCmdLineTest):
# --timid sets a flag, and program arguments get passed through.
self.cmd_executes("run --timid foo.py abc 123", """\
.Coverage(timid=True)
- .erase()
.start()
.run_python_file('foo.py', ['foo.py', 'abc', '123'])
.stop()
@@ -395,7 +393,6 @@ class CmdLineTest(BaseCmdLineTest):
# -L sets a flag, and flags for the program don't confuse us.
self.cmd_executes("run -p -L foo.py -a -b", """\
.Coverage(cover_pylib=True, data_suffix=True)
- .erase()
.start()
.run_python_file('foo.py', ['foo.py', '-a', '-b'])
.stop()
@@ -403,7 +400,6 @@ class CmdLineTest(BaseCmdLineTest):
""")
self.cmd_executes("run --branch foo.py", """\
.Coverage(branch=True)
- .erase()
.start()
.run_python_file('foo.py', ['foo.py'])
.stop()
@@ -411,7 +407,6 @@ class CmdLineTest(BaseCmdLineTest):
""")
self.cmd_executes("run --rcfile=myrc.rc foo.py", """\
.Coverage(config_file="myrc.rc")
- .erase()
.start()
.run_python_file('foo.py', ['foo.py'])
.stop()
@@ -419,7 +414,6 @@ class CmdLineTest(BaseCmdLineTest):
""")
self.cmd_executes("run --include=pre1,pre2 foo.py", """\
.Coverage(include=["pre1", "pre2"])
- .erase()
.start()
.run_python_file('foo.py', ['foo.py'])
.stop()
@@ -427,7 +421,6 @@ class CmdLineTest(BaseCmdLineTest):
""")
self.cmd_executes("run --omit=opre1,opre2 foo.py", """\
.Coverage(omit=["opre1", "opre2"])
- .erase()
.start()
.run_python_file('foo.py', ['foo.py'])
.stop()
@@ -435,7 +428,6 @@ class CmdLineTest(BaseCmdLineTest):
""")
self.cmd_executes("run --include=pre1,pre2 --omit=opre1,opre2 foo.py", """\
.Coverage(include=["pre1", "pre2"], omit=["opre1", "opre2"])
- .erase()
.start()
.run_python_file('foo.py', ['foo.py'])
.stop()
@@ -443,7 +435,6 @@ class CmdLineTest(BaseCmdLineTest):
""")
self.cmd_executes("run --source=quux,hi.there,/home/bar foo.py", """\
.Coverage(source=["quux", "hi.there", "/home/bar"])
- .erase()
.start()
.run_python_file('foo.py', ['foo.py'])
.stop()
@@ -451,7 +442,6 @@ class CmdLineTest(BaseCmdLineTest):
""")
self.cmd_executes("run --concurrency=gevent foo.py", """\
.Coverage(concurrency='gevent')
- .erase()
.start()
.run_python_file('foo.py', ['foo.py'])
.stop()
@@ -459,7 +449,6 @@ class CmdLineTest(BaseCmdLineTest):
""")
self.cmd_executes("run --concurrency=multiprocessing foo.py", """\
.Coverage(concurrency='multiprocessing')
- .erase()
.start()
.run_python_file('foo.py', ['foo.py'])
.stop()
@@ -492,7 +481,6 @@ class CmdLineTest(BaseCmdLineTest):
def test_run_debug(self):
self.cmd_executes("run --debug=opt1 foo.py", """\
.Coverage(debug=["opt1"])
- .erase()
.start()
.run_python_file('foo.py', ['foo.py'])
.stop()
@@ -500,7 +488,6 @@ class CmdLineTest(BaseCmdLineTest):
""")
self.cmd_executes("run --debug=opt1,opt2 foo.py", """\
.Coverage(debug=["opt1","opt2"])
- .erase()
.start()
.run_python_file('foo.py', ['foo.py'])
.stop()
@@ -510,7 +497,6 @@ class CmdLineTest(BaseCmdLineTest):
def test_run_module(self):
self.cmd_executes("run -m mymodule", """\
.Coverage()
- .erase()
.start()
.run_python_module('mymodule', ['mymodule'])
.stop()
@@ -518,7 +504,6 @@ class CmdLineTest(BaseCmdLineTest):
""")
self.cmd_executes("run -m mymodule -qq arg1 arg2", """\
.Coverage()
- .erase()
.start()
.run_python_module('mymodule', ['mymodule', '-qq', 'arg1', 'arg2'])
.stop()
@@ -526,7 +511,6 @@ class CmdLineTest(BaseCmdLineTest):
""")
self.cmd_executes("run --branch -m mymodule", """\
.Coverage(branch=True)
- .erase()
.start()
.run_python_module('mymodule', ['mymodule'])
.stop()