forked from yukinarit/pyserde
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrunner.py
More file actions
72 lines (63 loc) · 1.24 KB
/
runner.py
File metadata and controls
72 lines (63 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import sys
import any
import collection
import custom_class_serializer
import custom_field_serializer
import default
import env
import flatten
import forward_reference
import generics
import jsonfile
import lazy_type_evaluation
import literal
import newtype
import rename
import rename_all
import simple
import skip
import tomlfile
import type_datetime
import type_decimal
import union
import union_tagging
import user_exception
import yamlfile
PY310 = sys.version_info[:3] >= (3, 10, 0)
def run_all():
run(any)
run(simple)
run(newtype)
run(collection)
run(default)
run(env)
run(flatten)
run(jsonfile)
run(rename)
run(rename_all)
run(skip)
run(tomlfile)
run(yamlfile)
run(union)
run(custom_class_serializer)
run(custom_field_serializer)
run(forward_reference)
run(type_decimal)
run(type_datetime)
run(union_tagging)
run(generics)
run(lazy_type_evaluation)
run(literal)
run(user_exception)
if PY310:
import union_operator
run(union_operator)
def run(module):
print('-----------------')
print(f'running {module.__name__}')
module.main()
if __name__ == '__main__':
try:
run_all()
except Exception:
sys.exit(1)