(test_dir, source)
| 310 | |
| 311 | |
| 312 | def create_package(test_dir, source): |
| 313 | ofi = None |
| 314 | try: |
| 315 | for line in source.splitlines(): |
| 316 | if type(line) != bytes: |
| 317 | line = line.encode('utf-8') |
| 318 | if line.startswith(b' ') or line.startswith(b'\t'): |
| 319 | ofi.write(line.strip() + b'\n') |
| 320 | else: |
| 321 | if ofi: |
| 322 | ofi.close() |
| 323 | if type(line) == bytes: |
| 324 | line = line.decode('utf-8') |
| 325 | ofi = open_file(os.path.join(test_dir, line.strip())) |
| 326 | finally: |
| 327 | if ofi: |
| 328 | ofi.close() |
| 329 | |
| 330 | class ModuleFinderTest(unittest.TestCase): |
| 331 | def setUp(self): |
no test coverage detected
searching dependent graphs…