kalekundert / parametrize_from_file

Read unit test parameters from config files
MIT License
16 stars 3 forks source link

Accept any callable as the schema #1

Closed kalekundert closed 3 years ago

kalekundert commented 3 years ago

Rather than explicitly depending on the schema package, I can just accept any callable. This is more flexible, and makes it possible to do custom processing on the whole parameter dictionary at once (schema only looks at one key at a time). I can continue to use schema like so:

@parametrize_From_file(
        schema=Schema({
            object: object
        }).validate
)