File: core.py

package info (click to toggle)
dataclasses-json 0.6.7-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 568 kB
  • sloc: python: 3,757; makefile: 7
file content (15 lines) | stat: -rw-r--r-- 341 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from hypothesis import example


def examples(*args):
    """A variadic `examples` decorator to both supplant stacking of @example
    and support iterables being passed in directly
    """

    def examples_decorator(f):
        g = f
        for arg in args:
            g = example(arg)(g)
        return g

    return examples_decorator