astropy/astropy — pull request #2612 by adonath (2014-06-10 16:48:49+00:00)
Title: Reusable Fittable1DModelTester and Fittabel2DModelTester classes

This PR modifies the `FittableModel` testing, that it can be easily reused in affiliated packages. Therefore the classes `FittabelModel1DTester` and `FittabelModel2DTester` were introduced, which can be used as base classes for user defined model testing. To give you an idea here is the corresponding code snippet, which defines the model test:

```
@pytest.mark.parametrize(('model_class', 'test_parameters'), list(models_1D.items()))
class TestFittable1DModels(Fittable1DModelTester):
pass
```
Were `models_1D` is the dictionary with the test parameters as defined in `modeling.tests.example_models`. The class can now be used with any user defined dictionary for the test parameters, as long as it follows the definitions in `modeling.tests.example_models`.