示例#1
0
 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)
示例#2
0
 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")