Skip to content

Commit 99e73be

Browse files
author
Kotsias, Panagiotis-Christos
committed
Added timestamps in logs
1 parent eccf532 commit 99e73be

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/test_modules.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
from unittest import TestCase
21
import json
2+
from datetime import datetime
3+
from unittest import TestCase
34

45
from etherscan.etherscan import Etherscan
56

@@ -32,9 +33,10 @@ def test_methods(self):
3233
# Create log files (will update existing ones)
3334
fname = f"logs/{fun}.json"
3435
log = {
35-
"name": fun,
36+
"method": fun,
3637
"module": v["module"],
3738
"kwargs": v["kwargs"],
39+
"timestamp": datetime.now().strftime("%Y-%m-%d-%H:%M:%S"),
3840
"res": res,
3941
}
4042
dump(log, fname)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy