diff --git a/pylib/tests/shared.py b/pylib/tests/shared.py index 819a7be7c..e988dfc6d 100644 --- a/pylib/tests/shared.py +++ b/pylib/tests/shared.py @@ -64,11 +64,14 @@ testDir = os.path.dirname(__file__) def errorsAfterMidnight(func): - lt = time.localtime() - if lt.tm_hour < 4: - print("test disabled around cutoff", func) - else: - func() + def wrapper(): + lt = time.localtime() + if lt.tm_hour < 4: + print("test disabled around cutoff", func) + else: + func() + + return wrapper def isNearCutoff():