mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-13 08:59:44 +08:00
change: remove locust for python version
This commit is contained in:
@@ -20,7 +20,6 @@ class TestCaseRequestWithFunctions(HttpRunner):
|
||||
.base_url("https://postman-echo.com")
|
||||
.verify(False)
|
||||
.export(*["foo3"])
|
||||
.locust_weight(2)
|
||||
)
|
||||
|
||||
teststeps = [
|
||||
|
||||
@@ -29,7 +29,6 @@ class TestCaseRequestWithTestcaseReference(HttpRunner):
|
||||
)
|
||||
.base_url("https://postman-echo.com")
|
||||
.verify(False)
|
||||
.locust_weight(3)
|
||||
)
|
||||
|
||||
teststeps = [
|
||||
|
||||
@@ -20,7 +20,6 @@ class TestCaseRequestWithFunctions(HttpRunner):
|
||||
.base_url("https://postman-echo.com")
|
||||
.verify(False)
|
||||
.export(*["foo3"])
|
||||
.locust_weight(2)
|
||||
)
|
||||
|
||||
teststeps = [
|
||||
|
||||
@@ -93,7 +93,7 @@ def main():
|
||||
sys.exit(0)
|
||||
|
||||
extra_args = []
|
||||
if len(sys.argv) >= 2 and sys.argv[1] in ["run", "locusts"]:
|
||||
if len(sys.argv) >= 2 and sys.argv[1] in ["run"]:
|
||||
args, extra_args = parser.parse_known_args()
|
||||
else:
|
||||
args = parser.parse_args()
|
||||
|
||||
@@ -47,10 +47,6 @@ class Config(object):
|
||||
def path(self) -> Text:
|
||||
return self.__config.path
|
||||
|
||||
@property
|
||||
def weight(self) -> int:
|
||||
return self.__config.weight
|
||||
|
||||
def variables(self, **variables) -> "Config":
|
||||
self.__config.variables.update(variables)
|
||||
return self
|
||||
@@ -68,10 +64,6 @@ class Config(object):
|
||||
self.__config.export = list(set(self.__config.export))
|
||||
return self
|
||||
|
||||
def locust_weight(self, weight: int) -> "Config":
|
||||
self.__config.weight = weight
|
||||
return self
|
||||
|
||||
def struct(self) -> TConfig:
|
||||
return self.__config
|
||||
|
||||
|
||||
@@ -198,9 +198,6 @@ def make_config_chain_style(config: Dict) -> Text:
|
||||
if "export" in config:
|
||||
config_chain_style += f'.export(*{config["export"]})'
|
||||
|
||||
if "weight" in config:
|
||||
config_chain_style += f'.locust_weight({config["weight"]})'
|
||||
|
||||
return config_chain_style
|
||||
|
||||
|
||||
@@ -484,10 +481,6 @@ def make_testsuite(testsuite: Dict):
|
||||
)
|
||||
testcase_dict["config"]["variables"].update(testcase_variables)
|
||||
|
||||
# override weight
|
||||
if "weight" in testcase:
|
||||
testcase_dict["config"]["weight"] = testcase["weight"]
|
||||
|
||||
# make testcase
|
||||
testcase_pytest_path = make_testcase(testcase_dict, testsuite_dir)
|
||||
pytest_files_run_set.add(testcase_pytest_path)
|
||||
|
||||
@@ -49,7 +49,7 @@ class TConfig(BaseModel):
|
||||
# teardown_hooks: Hooks = []
|
||||
export: Export = []
|
||||
path: Text = None
|
||||
weight: int = 1
|
||||
# configs for other protocols
|
||||
thrift: TConfigThrift = None
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user