From cdf3e4f5f1da1926a63ab07791d5cbfc552dece4 Mon Sep 17 00:00:00 2001 From: debugtalk Date: Tue, 21 Aug 2018 17:53:34 +0800 Subject: [PATCH] fix compatibility for Python2.7 --- httprunner/utils.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/httprunner/utils.py b/httprunner/utils.py index 877c2593..d12cb2be 100644 --- a/httprunner/utils.py +++ b/httprunner/utils.py @@ -270,11 +270,7 @@ def add_teststep(test_runner, teststep_dict): self.meta_data["validators"] = test_runner.context.evaluated_validators test_runner.http_client_session.init_meta_data() - if is_py2: - test.__func__.__doc__ = teststep_dict["name"] - else: - test.__doc__ = teststep_dict["name"] - + test.__doc__ = teststep_dict["name"] return test