PSLmodels / Tax-Brain

Tax-Brain is an integrator model for PSL tax models
http://taxbrain.pslmodels.org/
MIT License
8 stars 12 forks source link

Add when validator for year parameter #177

Closed hdoupe closed 3 years ago

hdoupe commented 3 years ago

Resolves #176

hdoupe commented 3 years ago

Sorry, accidentally formatted the entire test_functions.py file.

hdoupe commented 3 years ago

Well, validation works:

>           raise self.validation_error
E           paramtools.exceptions.ValidationError: {
E               "errors": {
E                   "year": [
E                       "When data_source is equal to CPS, year value is invalid: year 2013 < min 2014 "
E                   ]
E               }
E           }

The grid logic for testing get_inputs with all combinations of meta parameters doesn't handle the when validator correctly. I'm inclined to skip this test or input configuration somehow so this doesn't hold things up, but I'll think about this some more.