shawnbrown / datatest

Tools for test driven data-wrangling and data validation.
Other
294 stars 13 forks source link

Add pass-through behavior to assertValid() method. #26

Closed shawnbrown closed 7 years ago

shawnbrown commented 7 years ago

Add pass-through behavior to assertValid() to help replace functionality that will be lost when removing the more magical helper methods (like assertSubjectSum(), et al).

Using the existing data/required syntax can be cumbersome in certain cases. By adding support for an optional calling convention (a function signature), duplication can be reduced. While the data/required signature will remain the default behavior (which will appear in the docstring when introspected) a second, optional signature will also be supported:

    TestCase.assertValid(data, required, msg=None)
    TestCase.assertValid(function, /, msg=None)
shawnbrown commented 7 years ago

This is done: 1765b8c864adec2af7b0591ef5f20995a29327a4