def setUp(self): self.config = Namespace() self.config.cpus = 2 config.set_config(self.config) self.tt = TraceTracker() proc = Mock('proc', tracker=self.tt, returncode=0) proc.communicate = Mock('proc.communicate', returns=('output', 'error'), tracker=self.tt) mock('subprocess.Popen', tracker=self.tt, returns=proc)
def setUp(self): self.config = Namespace() self.config.cpus = 2 config.set_config(self.config) self.tt = TraceTracker() proc = Mock('proc', tracker=self.tt, returncode=0) proc.communicate = Mock('proc.communicate', returns=('output', 'error'), tracker=self.tt) mock('subprocess.Popen', tracker=self.tt, returns=proc) self.tmpdir = tempfile.mkdtemp(prefix="as_tests_util")