change: remove locust for python version

This commit is contained in:
debugtalk
2022-04-03 00:13:28 +08:00
parent 96117bcc1d
commit f8798358b2
7 changed files with 2 additions and 20 deletions

View File

@@ -20,7 +20,6 @@ class TestCaseRequestWithFunctions(HttpRunner):
.base_url("https://postman-echo.com")
.verify(False)
.export(*["foo3"])
.locust_weight(2)
)
teststeps = [

View File

@@ -29,7 +29,6 @@ class TestCaseRequestWithTestcaseReference(HttpRunner):
)
.base_url("https://postman-echo.com")
.verify(False)
.locust_weight(3)
)
teststeps = [

View File

@@ -20,7 +20,6 @@ class TestCaseRequestWithFunctions(HttpRunner):
.base_url("https://postman-echo.com")
.verify(False)
.export(*["foo3"])
.locust_weight(2)
)
teststeps = [

View File

@@ -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()

View File

@@ -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

View File

@@ -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)

View File

@@ -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