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'
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')
def test_get_thickness(self): """Get a regular model.""" assert mt.get_thickness_model( 'Halsey') == mt._THICKNESS_MODELS['Halsey']