From 53c4ac2f3975fb4470e291b0fb7b21b7a4d61e11 Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Wed, 24 Aug 2022 14:20:14 -0700 Subject: [PATCH] minor improvements to coverage, ignoring buggy/tests --- ui/medashare/cli.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ui/medashare/cli.py b/ui/medashare/cli.py index d61dad9..ac7f892 100644 --- a/ui/medashare/cli.py +++ b/ui/medashare/cli.py @@ -1369,7 +1369,7 @@ class _TestCases(unittest.TestCase): for cmd in cmds: try: - if cmd['skip']: + if cmd['skip']: # pragma: no cover continue except KeyError: pass @@ -1400,7 +1400,10 @@ class _TestCases(unittest.TestCase): else: # pragma: no cover raise ValueError('unhandled special: %s' % repr(special)) - continue + # coverage bug, fixed in 3.10: + # https://github.com/nedbat/coveragepy/issues/1432#event-7130600158 + if True: # pragma: no cover + continue with self.subTest(file=f, title=cmd['title']), \ mock.patch('os.path.expanduser',