Did I find the right examples for you? yes no

All Samples(21)  |  Call(21)  |  Derive(0)  |  Import(0)
Honour the longMessage attribute when generating failure messages.
If longMessage is False this means:
* Use only an explicit message if it is provided
* Otherwise use the standard message for the assert

If longMessage is True:
* Use the standard message
* If an explicit message is provided, plus ' : ' and the explicit message

src/i/r/ironpython3-HEAD/Src/StdLib/Lib/test/test_statistics.py   ironpython3(Download)
                % (len(first), len(second))
                )
            msg = self._formatMessage(msg, standardMsg)
            raise self.failureException(msg)
        for i, (a,e) in enumerate(zip(first, second)):
        # Otherwise we failed.
        standardMsg = self._make_std_err_msg(first, second, tol, rel, idx)
        msg = self._formatMessage(msg, standardMsg)
        raise self.failureException(msg)
 

src/c/p/cpython-HEAD/Lib/test/test_statistics.py   cpython(Download)
                % (len(first), len(second))
                )
            msg = self._formatMessage(msg, standardMsg)
            raise self.failureException(msg)
        for i, (a,e) in enumerate(zip(first, second)):
        # Otherwise we failed.
        standardMsg = self._make_std_err_msg(first, second, tol, rel, idx)
        msg = self._formatMessage(msg, standardMsg)
        raise self.failureException(msg)
 

src/p/a/passlib-1.6.2/passlib/tests/backports.py   passlib(Download)
        def assertIs(self, real, correct, msg=None):
            if real is not correct:
                std = "got %r, expected would be %r" % (real, correct)
                msg = self._formatMessage(msg, std)
                raise self.failureException(msg)
 
        def assertIsNot(self, real, correct, msg=None):
            if real is correct:
                std = "got %r, expected would not be %r" % (real, correct)
                msg = self._formatMessage(msg, std)
        def assertIsInstance(self, obj, klass, msg=None):
            if not isinstance(obj, klass):
                std = "got %r, expected instance of %r" % (obj, klass)
                msg = self._formatMessage(msg, std)
                raise self.failureException(msg)
                                                              repr(second),
                                                              places)
            msg = self._formatMessage(msg, standardMsg)
            raise self.failureException(msg)
 
        def assertEqual(self, real, correct, msg=None):
            if real != correct:
                std = "got %r, expected would equal %r" % (real, correct)
                msg = self._formatMessage(msg, std)
                raise self.failureException(msg)

src/h/o/holmium.core-0.7.4/holmium/core/testcase.py   holmium.core(Download)
            wait.until(condition(element))
        except TimeoutException:
            _msg = self._formatMessage(msg, "Timeout waiting on condition %s" % condition)
            self.failureException(_msg)
 

src/a/p/appscale-HEAD/AppServer/lib/argparse/test/test_argparse.py   appscale(Download)
    def assertTrue(self, expr, msg=None):
        if not expr:
            msg = self._formatMessage(msg, "%s is not True" % safe_repr(expr))
            raise self.failureException(msg)
 

src/h/o/holmium.core-HEAD/holmium/core/testcase.py   holmium.core(Download)
            wait.until(condition(element))
        except TimeoutException:
            _msg = self._formatMessage(msg, "Timeout waiting on condition %s" % condition)
            self.failureException(_msg)
 

src/g/o/google-app-engine-HEAD/lib/argparse/test/test_argparse.py   google-app-engine(Download)
    def assertTrue(self, expr, msg=None):
        if not expr:
            msg = self._formatMessage(msg, "%s is not True" % safe_repr(expr))
            raise self.failureException(msg)
 

src/n/e/neutron-drive-HEAD/google_appengine/lib/argparse/test/test_argparse.py   neutron-drive(Download)
    def assertTrue(self, expr, msg=None):
        if not expr:
            msg = self._formatMessage(msg, "%s is not True" % safe_repr(expr))
            raise self.failureException(msg)
 

src/g/o/googleappengine-python-HEAD/lib/argparse/test/test_argparse.py   googleappengine-python(Download)
    def assertTrue(self, expr, msg=None):
        if not expr:
            msg = self._formatMessage(msg, "%s is not True" % safe_repr(expr))
            raise self.failureException(msg)
 

src/m/o/modgrammar-0.10/tests/util.py   modgrammar(Download)
  def assertIsInstance(self, obj, cls, msg=None):
    if not isinstance(obj, cls):
      msg = self._formatMessage(msg, "%r is not an instance of %r" % (obj, cls))
      raise self.failureException(msg)
 
  def assertIsSubclass(self, obj, cls, msg=None):
    if not issubclass(obj, cls):
      msg = self._formatMessage(msg, "%r is not a subclass of %r" % (obj, cls))

  1 | 2  Next