Get all modul paths with non-Unix-like first line.
(self, folder, rootName)
| 109 | "Testing if objects in the ReportLab package have docstrings." |
| 110 | |
| 111 | def findSuspiciousModules(self, folder, rootName): |
| 112 | "Get all modul paths with non-Unix-like first line." |
| 113 | |
| 114 | firstLinePat = re.compile('^#!.*python.*') |
| 115 | |
| 116 | paths = [] |
| 117 | for file in GlobDirectoryWalker(folder, '*.py'): |
| 118 | if os.path.basename(file) == '__init__.py': |
| 119 | continue |
| 120 | firstLine = open_and_readlines(file)[0] |
| 121 | if not firstLinePat.match(firstLine): |
| 122 | paths.append(file) |
| 123 | |
| 124 | return paths |
| 125 | |
| 126 | def test1(self): |
| 127 | "Test if all Python files have a Unix-like first line." |
no test coverage detected