示例#1
0
    def test_get_thickness_callable(self):
        """When we pass a function, we receive it back."""
        def call_this():
            return 'called'

        ret = mt.get_thickness_model(call_this)
        assert ret() == 'called'
示例#2
0
 def test_get_thickness_error(self):
     """When the model requested is not found we raise."""
     with pytest.raises(pgEx.ParameterError):
         mt.get_thickness_model('bad_model')
示例#3
0
 def test_get_thickness(self):
     """Get a regular model."""
     assert mt.get_thickness_model(
         'Halsey') == mt._THICKNESS_MODELS['Halsey']