(self, name, contents)
| 572 | shutil.rmtree(self.basedir) |
| 573 | |
| 574 | def create_module(self, name, contents): |
| 575 | base, final = name.rsplit('.', 1) |
| 576 | base_path = os.path.join(self.basedir, base.replace('.', os.path.sep)) |
| 577 | os.makedirs(base_path, exist_ok=True) |
| 578 | with open(os.path.join(base_path, final + ".py"), 'w') as f: |
| 579 | f.write(contents) |
| 580 | |
| 581 | def test_nested(self): |
| 582 | pkgutil_boilerplate = ( |