Пример #1
0
 def detectsError(self, rx):
     if not self._file.closed:
         self._file.close()
     try:
         fstest.check(self._temp)
     except FormatError, msg:
         mo = re.search(rx, str(msg))
         self.failIf(mo is None, "unexpected error: %s" % msg)
Пример #2
0
 def detectsError(self, rx):
     if not self._file.closed:
         self._file.close()
     try:
         fstest.check(self._temp)
     except FormatError, msg:
         mo = re.search(rx, str(msg))
         self.failIf(mo is None, "unexpected error: %s" % msg)
Пример #3
0
 def detectsError(self, rx):
     if not self._file.closed:
         self._file.close()
     try:
         fstest.check(self._temp)
     except FormatError as msg:
         mo = re.search(rx, str(msg))
         self.assertFalse(mo is None, "unexpected error: %s" % msg)
     else:
         self.fail("fstest did not detect corruption")
Пример #4
0
 def detectsError(self, rx):
     if not self._file.closed:
         self._file.close()
     try:
         fstest.check(self._temp)
     except FormatError as msg:
         mo = re.search(rx, str(msg))
         self.assertFalse(mo is None, "unexpected error: %s" % msg)
     else:
         self.fail("fstest did not detect corruption")
Пример #5
0
 def noError(self):
     if not self._file.closed:
         self._file.close()
     fstest.check(self._temp)
Пример #6
0
 def noError(self):
     if not self._file.closed:
         self._file.close()
     fstest.check(self._temp)