Ejemplo n.º 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))
Ejemplo n.º 2
0
 def test_requires_an_instruction(self):
     with self.assertRaises(TypeError):
         exceptions.InvalidInstruction()
Ejemplo n.º 3
0
 def test_extends_from_conda_exception(self):
     e = exceptions.InvalidInstruction("foo")
     self.assertIsInstance(e, exceptions.CondaException)