Skip to content

Commit

Permalink
Create a instance if the test func is a test object
Browse files Browse the repository at this point in the history
Signed-off-by: Luyao Huang <[email protected]>
  • Loading branch information
LuyaoHuang committed May 25, 2020
1 parent c235582 commit 85fdf21
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion depend_test_framework/runner_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import itertools
import contextlib

from .test_object import MistClearException, TestEndException, StaticMist, MistDeadEndException
from .test_object import MistClearException, TestEndException, StaticMist, MistDeadEndException, is_TestObject
from .case import Case
from .log import get_logger

Expand Down Expand Up @@ -91,6 +91,8 @@ def handle_func(self, func, doc_func,
else:
self.desc_logger(test_func, only_doc)

if is_TestObject(test_func):
test_func = test_func()
new_mist = test_func(params, tgt_env)

if new_mist and mists is not None:
Expand Down

0 comments on commit 85fdf21

Please sign in to comment.