diff options
Diffstat (limited to 'tests/utils.py')
-rw-r--r-- | tests/utils.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/utils.py b/tests/utils.py new file mode 100644 index 0000000..427c728 --- /dev/null +++ b/tests/utils.py @@ -0,0 +1,17 @@ +from pathlib import Path + +TEST_DIR = Path(__file__).resolve().parent / '__test_data__' + + +class Struct: + """ + Use this to make "mock" version of asciidoc classes. Usage is passing in kwargs, + and these are set to the properties of the class. + + >>> a = Struct(foo=1, bar=2) + >>> a.foo + 1 + >>> a.bar + 2 + """ + def __init__(self, **entries): self.__dict__.update(entries) |