def tearDown(self): if hasattr(self, 'cheesecake'): if os.path.isdir(self.cheesecake.sandbox): rmtree(self.cheesecake.sandbox) if hasattr(self, 'logfile'): if os.path.isfile(self.logfile): os.unlink(self.logfile)
def test_long_file_list(self): "Test if pylint index works for long files lists." _package_dir = tempfile.mkdtemp() _files_list = map(lambda x: 'long_module_with_a_number_%d.py' % x, xrange(4000)) for filename in _files_list: create_empty_file(os.path.join(_package_dir, filename)) logger.setconsumer('console', logger.STDOUT) console_log = logger.MultipleProducer('cheesecake console') class CheesecakeMockup(object): package_dir = _package_dir files_list = _files_list log = console_log index = IndexPyLint() cheesecake = CheesecakeMockup() index.compute_with(cheesecake) assert index.details != "encountered an error during pylint execution" # Clean up. rmtree(_package_dir)
def tearDown(self): if os.path.exists(self.sandbox_dir): rmtree(self.sandbox_dir)
def tearDown(self): if os.path.exists(self.project_dir): rmtree(self.project_dir)