mirror of
https://github.com/microsoft/debugpy.git
synced 2025-12-23 08:48:12 +00:00
lint
This commit is contained in:
parent
b50c9a059c
commit
b820519181
2 changed files with 17 additions and 10 deletions
|
|
@ -115,7 +115,7 @@ def run_tests(argv, env, coverage=False):
|
|||
if coverage:
|
||||
args = [
|
||||
sys.executable,
|
||||
'-m', 'coverage',
|
||||
'-m', 'coverage',
|
||||
'run',
|
||||
'--include', 'ptvsd/*.py',
|
||||
'--omit', 'ptvsd/pydevd/*.py',
|
||||
|
|
@ -140,5 +140,5 @@ if __name__ == '__main__':
|
|||
run_tests(
|
||||
argv,
|
||||
env,
|
||||
coverage=(runtests=='coverage'),
|
||||
coverage=(runtests == 'coverage'),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,9 @@ class ConvertArgsTests(unittest.TestCase):
|
|||
self.assertFalse(lint)
|
||||
|
||||
def test_discovery_full(self):
|
||||
argv, env, runtests, lint = convert_argv(['-v', '--failfast', '--full'])
|
||||
argv, env, runtests, lint = convert_argv([
|
||||
'-v', '--failfast', '--full',
|
||||
])
|
||||
|
||||
self.assertEqual(argv, [
|
||||
sys.executable + ' -m unittest',
|
||||
|
|
@ -44,7 +46,9 @@ class ConvertArgsTests(unittest.TestCase):
|
|||
self.assertFalse(lint)
|
||||
|
||||
def test_discovery_quick(self):
|
||||
argv, env, runtests, lint = convert_argv(['-v', '--failfast', '--quick'])
|
||||
argv, env, runtests, lint = convert_argv([
|
||||
'-v', '--failfast', '--quick',
|
||||
])
|
||||
|
||||
self.assertEqual(argv, [
|
||||
sys.executable + ' -m unittest',
|
||||
|
|
@ -60,11 +64,12 @@ class ConvertArgsTests(unittest.TestCase):
|
|||
self.assertFalse(lint)
|
||||
|
||||
def test_modules(self):
|
||||
argv, env, runtests, lint = convert_argv(['-v', '--failfast',
|
||||
'w',
|
||||
'x/y.py:Spam.test_spam'.replace('/', os.sep),
|
||||
'z:Eggs',
|
||||
])
|
||||
argv, env, runtests, lint = convert_argv([
|
||||
'-v', '--failfast',
|
||||
'w',
|
||||
'x/y.py:Spam.test_spam'.replace('/', os.sep),
|
||||
'z:Eggs',
|
||||
])
|
||||
|
||||
self.assertEqual(argv, [
|
||||
sys.executable + ' -m unittest',
|
||||
|
|
@ -109,7 +114,9 @@ class ConvertArgsTests(unittest.TestCase):
|
|||
self.assertTrue(lint)
|
||||
|
||||
def test_lint_only(self):
|
||||
argv, env, runtests, lint = convert_argv(['--quick', '--lint-only', '-v'])
|
||||
argv, env, runtests, lint = convert_argv([
|
||||
'--quick', '--lint-only', '-v',
|
||||
])
|
||||
|
||||
self.assertIsNone(argv)
|
||||
self.assertIsNone(env)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue