Пример #1
0
    def test_inherited_str_is_correct(self):
        try:
            raise exceptions.CondaValueError('value incorrect')
        except exceptions.CondaValueError as e:
            err = conda.CondaError("Can't do that", e)

        self.assertEqual(str(err),
                         "Can't do that Value error: value incorrect\n")
Пример #2
0
    def test_json_flags_not_in_output(self):
        try:
            raise exceptions.CondaValueError('value incorrect', False)
        except exceptions.CondaValueError as e:
            err = conda.CondaError("Can't do that", e, True)

        self.assertNotIn('False', repr(err))
        self.assertNotIn('True', repr(err))
        self.assertNotIn('False', str(err))
        self.assertNotIn('True', str(err))
Пример #3
0
 def test_str_is_correct(self):
     e = conda.CondaError("Can't do that")
     self.assertEqual(str(e), "Can't do that")