Ejemplo n.º 1
0
 def test_custom_container_value_method(self):
     """ 
     Reject unsupported property types.
     """
     with self.assertRaises(ValueError):
         def fun():
             print(":)")
         containers.add_custom_container({'well_depth': fun})
Ejemplo n.º 2
0
    def test_custom_container_value_method(self):
        """ 
        Reject unsupported property types.
        """
        with self.assertRaises(ValueError):

            def fun():
                print(":)")

            containers.add_custom_container({'well_depth': fun})
Ejemplo n.º 3
0
 def test_custom_container_property(self):
     """
     Reject unknown properties.
     """
     with self.assertRaises(KeyError):
         containers.add_custom_container({'fake_key':True})
Ejemplo n.º 4
0
 def test_custom_container_type(self):
     """
     Enforce valid custom container type.
     """
     with self.assertRaises(KeyError):
         containers.add_custom_container({'type':'imaginary'})
Ejemplo n.º 5
0
 def test_custom_container_property(self):
     """
     Reject unknown properties.
     """
     with self.assertRaises(KeyError):
         containers.add_custom_container({'fake_key': True})
Ejemplo n.º 6
0
 def test_custom_container_type(self):
     """
     Enforce valid custom container type.
     """
     with self.assertRaises(KeyError):
         containers.add_custom_container({'type': 'imaginary'})