Ejemplo n.º 1
0
 def test_does_not_need_preprosessing_for_single_trait_object(self):
     traits = Traits(({}, ))
     self.assertFalse(traits.needs_preprocessing())
Ejemplo n.º 2
0
 def test_raises_error_when_arguments_mixed_with_function_and_strings(self):
     traits = Traits((lambda: None, "", ""))
     with self.assertRaises(FirstTraitArgumentError):
         traits.needs_preprocessing()
Ejemplo n.º 3
0
 def test_needs_preprosessing_when_object_and_strings_are_given(self):
     traits = Traits(({}, ""))
     self.assertTrue(traits.needs_preprocessing())
Ejemplo n.º 4
0
 def test_raises_error_when_first_argument_is_string(self):
     traits = Traits(("", ""))
     with self.assertRaises(FirstTraitArgumentError):
         traits.needs_preprocessing()
Ejemplo n.º 5
0
 def test_raises_error_when_arguments_mixed_with_objects_and_strings(self):
     traits = Traits(({}, "", lambda: None))
     with self.assertRaises(TraitArgumentTypeError):
         traits.needs_preprocessing()
Ejemplo n.º 6
0
 def test_does_not_need_preprosessing_for_single_trait_object(self):
     traits = Traits(({}, ))
     self.assertFalse(traits.needs_preprocessing())
Ejemplo n.º 7
0
 def test_does_not_need_preprosessing_for_multiple_trait_functions(self):
     traits = Traits((lambda: None, lambda: None))
     self.assertFalse(traits.needs_preprocessing())
Ejemplo n.º 8
0
 def test_needs_preprosessing_when_object_and_strings_are_given(self):
     traits = Traits(({}, ""))
     self.assertTrue(traits.needs_preprocessing())
Ejemplo n.º 9
0
 def test_raises_error_when_arguments_mixed_with_function_and_strings(self):
     traits = Traits((lambda: None, "", ""))
     with self.assertRaises(FirstTraitArgumentError):
         traits.needs_preprocessing()
Ejemplo n.º 10
0
 def test_raises_error_when_arguments_mixed_with_objects_and_strings(self):
     traits = Traits(({}, "", lambda: None))
     with self.assertRaises(TraitArgumentTypeError):
         traits.needs_preprocessing()
Ejemplo n.º 11
0
 def test_raises_error_when_first_argument_is_string(self):
     traits = Traits(("", ""))
     with self.assertRaises(FirstTraitArgumentError):
         traits.needs_preprocessing()
Ejemplo n.º 12
0
 def test_does_not_need_preprosessing_for_multiple_trait_functions(self):
     traits = Traits((lambda: None, lambda: None))
     self.assertFalse(traits.needs_preprocessing())