We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 614a11b commit 3b7aa55Copy full SHA for 3b7aa55
test/test_modules.py
@@ -12,6 +12,11 @@ def load(fname):
12
return json.load(f)
13
14
15
+def dump(data, fname):
16
+ with open(fname, "w") as f:
17
+ json.dump(data, f, indent=2)
18
+
19
20
class Case(TestCase):
21
_MODULE = ""
22
@@ -24,6 +29,15 @@ def test_methods(self):
24
29
if v["module"] == self._MODULE:
25
30
res = getattr(etherscan, fun)(**v["kwargs"])
26
31
print(f"METHOD: {fun}, RTYPE: {type(res)}")
32
+ # Create log files (will update existing ones)
33
+ fname = f"logs/{fun}.json"
34
+ log = {
35
+ "name": fun,
36
+ "module": v["module"],
37
+ "kwargs": v["kwargs"],
38
+ "res": res,
39
+ }
40
+ dump(log, fname)
27
41
28
42
43
class TestAccounts(Case):
0 commit comments