Module: check_mk
Branch: master
Commit: ed02da4b71e6c68ba4e13418dab26cfd4085ce75
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ed02da4b71e6c6…
Author: Moritz Kiemer <mo(a)mathias-kettner.de>
Date: Tue Apr 23 10:13:14 2019 +0200
move freeze time in front of parse function
Change-Id: Ia66b54232ec6e71b173789aa5d7c42c51fa7b644
---
tests/unit/checks/generictests/run.py | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/tests/unit/checks/generictests/run.py
b/tests/unit/checks/generictests/run.py
index 9d9bb8e..79ed3b3 100644
--- a/tests/unit/checks/generictests/run.py
+++ b/tests/unit/checks/generictests/run.py
@@ -186,14 +186,15 @@ def run(check_manager, dataset, write=False):
assert checklist, "Found no check plugin for %r" % dataset.checkname
immu = Immutables()
- # test the parse function
- parsed = parse(check_manager, dataset)
- immu.register(parsed, 'parsed')
-
- # get the expected check results, if present
- checks_expected = getattr(dataset, 'checks', {})
with optional_freeze_time(dataset):
+ # test the parse function
+ parsed = parse(check_manager, dataset)
+ immu.register(parsed, 'parsed')
+
+ # get the expected check results, if present
+ checks_expected = getattr(dataset, 'checks', {})
+
# LOOP OVER ALL (SUB)CHECKS
for sname in checklist:
subcheck = (sname + '.').split('.')[1]