(test_dir, source)
| 298 | |
| 299 | |
| 300 | def create_package(test_dir, source): |
| 301 | ofi = None |
| 302 | try: |
| 303 | for line in source.splitlines(): |
| 304 | if type(line) != bytes: |
| 305 | line = line.encode('utf-8') |
| 306 | if line.startswith(b' ') or line.startswith(b'\t'): |
| 307 | ofi.write(line.strip() + b'\n') |
| 308 | else: |
| 309 | if ofi: |
| 310 | ofi.close() |
| 311 | if type(line) == bytes: |
| 312 | line = line.decode('utf-8') |
| 313 | ofi = open_file(os.path.join(test_dir, line.strip())) |
| 314 | finally: |
| 315 | if ofi: |
| 316 | ofi.close() |
| 317 | |
| 318 | class ModuleFinderTest(unittest.TestCase): |
| 319 | def setUp(self): |
no test coverage detected