Refs #30676 -- Added test for invalid --pdb and --parallel usage in DiscoverRunner.

This commit is contained in:
Mariusz Felisiak 2019-12-09 11:12:06 +01:00 committed by GitHub
parent 663bb435de
commit f464526388
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -261,6 +261,14 @@ class DiscoverRunnerTests(SimpleTestCase):
runner.build_suite(['test_runner_apps.tagged.tests'])
self.assertIn('Excluding test tag(s): bar, foo.\n', stdout.getvalue())
def test_pdb_with_parallel(self):
msg = (
'You cannot use --pdb with parallel tests; pass --parallel=1 to '
'use it.'
)
with self.assertRaisesMessage(ValueError, msg):
DiscoverRunner(pdb=True, parallel=2)
class DiscoverRunnerGetDatabasesTests(SimpleTestCase):
runner = DiscoverRunner(verbosity=2)