def setUp(self):
def _cleanup(testDir):<EOL><INDENT>if os.path.exists(testDir):<EOL><INDENT>shutil.rmtree(testDir)<EOL><DEDENT><DEDENT>self.testDirs = {}<EOL>for subd in ['<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>testDir = self.testDirs[subd] = os.path.join(os.getcwd(), subd)<EOL>self.addCleanup(_cleanup, testDir)<EOL>_cleanup(testDir)<EOL>os.makedirs(testDir)<EOL><DEDENT>self.my_reactor = test_procmon.DummyProcessReactor()<EOL>self.service = service.get(self.testDirs['<STR_LIT>'],<EOL>self.testDirs['<STR_LIT>'],<EOL><NUM_LIT:5>, reactor=self.my_reactor)<EOL>self._finishSetUp()<EOL>
Set up the test