From db2c35cb3f2c5d8248e1faca766ff85f093bf667 Mon Sep 17 00:00:00 2001 From: florian Date: Wed, 13 Jul 2022 17:22:55 +0200 Subject: [PATCH] tests - fix datetime import --- tests/Test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/Test.py b/tests/Test.py index f76755d77..6a435c1d1 100644 --- a/tests/Test.py +++ b/tests/Test.py @@ -7,6 +7,7 @@ from shutil import rmtree from os.path import isdir, join from os import mkdir, makedirs, walk, chmod from re import sub, MULTILINE +from datetime.datetime import today class Test(ABC) : @@ -18,7 +19,7 @@ class Test(ABC) : self._log("instiantiated with " + str(len(tests)) + " tests and timeout of " + str(timeout) + "s") def _log(self, msg, error=False) : - when = datetime.datetime.today().strftime("[%Y-%m-%d %H:%M:%S]") + when = today().strftime("[%Y-%m-%d %H:%M:%S]") what = self._name + " - " + self.__kind + " - " + msg if error : print(when + " " + what, flush=True, file=stderr)