diff --git a/tests.py b/tests.py index fc9b00f7..9550b26c 100644 --- a/tests.py +++ b/tests.py @@ -57,12 +57,13 @@ def test_search_unwanted_strings(self): filepath = os.path.join(root, f) if filepath.endswith('.pyc'): continue + if filepath.endswith('.swp'): + continue file = open(filepath, 'r') for line in file: if re.search('osvdb', line): self.fail('OSVDB string found from: %s' % filepath) - class FilePaths(unittest.TestCase): def test_filepaths(self): @@ -89,7 +90,7 @@ def test_detect_general_utf8(self): def test_detect_withoutnewlines_utf8(self): """Detect_general with UTF-8 encoded file.""" res = detect_withoutnewlines('testfiles/UTF-8', '5\.[0-9]+)') - + if __name__ == '__main__': if sys.version_info[0] < 3: