def setUp(self): pylabsTestCase.setUp(self) import sys from pylabs import q self._original_stdout = sys.stdout sys.stdout = self.output = StringIO() self._original_action = q.action q.action = ActionController(_width=40)
def setUp(self): pylabsTestCase.setUp(self) thispath = inspect.getfile(TestExtract) zipdir = os.path.dirname(thispath) self.zippath = os.path.join(zipdir, 'testzip.zip') self.out = os.path.join(q.dirs.tmpDir, 'ziptest') #Check md5sum of zipfile. We don't want this test to fail because #someone changed the file... assert os.path.exists(self.zippath) fd = open(self.zippath, 'rb') content = fd.read() fd.close() hash_calc = hashlib.md5(content) hash = hash_calc.hexdigest() assert hash == FILE_MD5, 'Invalid test zip file' del hash_calc del content
def setUp(self): pylabsTestCase.setUp(self) thispath = inspect.getfile(TestExtract) tardir = os.path.dirname(thispath) self.tarpath = os.path.join(tardir, 'testtar.tar.gz') self.out = os.path.join(q.dirs.tmpDir, 'tartest') #Check md5sum of tarfile. We don't want this test to fail because #someone changed the file... assert os.path.exists(self.tarpath) fd = open(self.tarpath, 'rb') content = fd.read() fd.close() hash_calc = hashlib.md5(content) hash = hash_calc.hexdigest() assert hash == FILE_MD5, 'Invalid test tar file' del hash_calc del content
def setUp(self): pylabsTestCase.setUp(self) self.cmdbobject = "testcase"
def setUp(self): pylabsTestCase.setUp(self) self.output = StringIO() self.action = ActionController(_output=self.output, _width=40)