mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-09 17:59:36 +08:00
fix compatibility for Python2.7
This commit is contained in:
@@ -270,11 +270,7 @@ def add_teststep(test_runner, teststep_dict):
|
|||||||
self.meta_data["validators"] = test_runner.context.evaluated_validators
|
self.meta_data["validators"] = test_runner.context.evaluated_validators
|
||||||
test_runner.http_client_session.init_meta_data()
|
test_runner.http_client_session.init_meta_data()
|
||||||
|
|
||||||
if is_py2:
|
test.__doc__ = teststep_dict["name"]
|
||||||
test.__func__.__doc__ = teststep_dict["name"]
|
|
||||||
else:
|
|
||||||
test.__doc__ = teststep_dict["name"]
|
|
||||||
|
|
||||||
return test
|
return test
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user