Пример #1
0
 def test_creates_message_with_instruction_name(self):
     random_instruction = random.randint(100, 200)
     e = exceptions.InvalidInstruction(random_instruction)
     expected = "No handler for instruction: %s" % random_instruction
     self.assertEqual(expected, str(e))
Пример #2
0
 def test_requires_an_instruction(self):
     with self.assertRaises(TypeError):
         exceptions.InvalidInstruction()
Пример #3
0
 def test_extends_from_conda_exception(self):
     e = exceptions.InvalidInstruction("foo")
     self.assertIsInstance(e, exceptions.CondaException)