diff --git a/tests/test_package.py b/tests/test_package.py index 7e80d02a..5d2cc23d 100644 --- a/tests/test_package.py +++ b/tests/test_package.py @@ -31,12 +31,10 @@ def setUpClass(cls): ) cls.get_version = re.compile(r"(?:\brelease|__version__)(?:\s*=\s*)(\'[^\']*\'|\"[^\"]*\")") - def test_missing_debug_statements(self): + def test_forgotten_debug_statements(self): # Exclude explicit debug statements written in the code exclude = { - 'regex.py': [240, 241], - 'codepoints.py': [534], - 'cli.py': [117, 133, 137, 140], + 'cli.py': ['print('], } message = "\nFound a debug missing statement at line %d or file %r: %r" @@ -54,7 +52,7 @@ def test_missing_debug_statements(self): continue match = self.missing_debug.search(line) - if match is None or filename.endswith('/cli.py') and match.group(0) == 'print(': + if match is None or match.group(0) in file_excluded: continue self.assertIsNone(match, message % (lineno, filename, match.group(0)))