diff options
| author | Ned Batchelder <ned@nedbatchelder.com> | 2014-09-25 06:40:09 -0400 |
|---|---|---|
| committer | Ned Batchelder <ned@nedbatchelder.com> | 2014-09-25 06:40:09 -0400 |
| commit | bee4695b9dd3ac9aee5d2dc2746a49a37aae0742 (patch) | |
| tree | 6d062b7fbd51f987fac3f9e7170dbae26da5fd95 /tests/test_cmdline.py | |
| parent | 7b5457967f256696d3b6c936e81436aa60b4b409 (diff) | |
| download | python-coveragepy-git-bee4695b9dd3ac9aee5d2dc2746a49a37aae0742.tar.gz | |
Some error checking and more tests for concurrency control.
Diffstat (limited to 'tests/test_cmdline.py')
| -rw-r--r-- | tests/test_cmdline.py | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/tests/test_cmdline.py b/tests/test_cmdline.py index bf96f27e..a2fec397 100644 --- a/tests/test_cmdline.py +++ b/tests/test_cmdline.py @@ -8,6 +8,8 @@ from coverage.misc import ExceptionDuringRun from tests.coveragetest import CoverageTest, OK, ERR +# TODO: change bare asserts to unittest asserts. +# TODO: base these tests on new cmdline, not old. class CmdLineTest(CoverageTest): """Tests of execution paths through the command line interpreter.""" @@ -565,8 +567,7 @@ class NewCmdLineTest(CmdLineTest): .stop() .save() """) - self.cmd_executes("run --source=quux,hi.there,/home/bar foo.py", - """\ + self.cmd_executes("run --source=quux,hi.there,/home/bar foo.py", """\ .coverage(source=["quux", "hi.there", "/home/bar"]) .erase() .start() @@ -574,6 +575,19 @@ class NewCmdLineTest(CmdLineTest): .stop() .save() """) + self.cmd_executes("run --concurrency=gevent foo.py", """\ + .coverage(concurrency='gevent') + .erase() + .start() + .run_python_file('foo.py', ['foo.py']) + .stop() + .save() + """) + + def test_bad_concurrency(self): + self.command_line("run --concurrency=nothing", ret=ERR) + out = self.stdout() + self.assertIn("option --concurrency: invalid choice: 'nothing'", out) def test_run_debug(self): self.cmd_executes("run --debug=opt1 foo.py", """\ |
