mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-24 17:59:58 +08:00
fix: windows not support thrift
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import platform
|
||||
from typing import Union
|
||||
|
||||
from httprunner.models import StepResult, TRequest, TStep, TestCase
|
||||
@@ -14,8 +15,6 @@ from httprunner.step_sql_request import (
|
||||
StepSqlRequestExtraction,
|
||||
)
|
||||
|
||||
from httprunner.step_thrift_request import RunThriftRequest,StepThriftRequestValidation,StepThriftRequestExtraction
|
||||
|
||||
|
||||
class Step(object):
|
||||
def __init__(
|
||||
@@ -28,9 +27,6 @@ class Step(object):
|
||||
RunSqlRequest,
|
||||
StepSqlRequestValidation,
|
||||
StepSqlRequestExtraction,
|
||||
RunThriftRequest,
|
||||
StepThriftRequestValidation,
|
||||
StepThriftRequestExtraction
|
||||
],
|
||||
):
|
||||
self.__step = step
|
||||
@@ -62,3 +58,29 @@ class Step(object):
|
||||
|
||||
def run(self, runner: HttpRunner) -> StepResult:
|
||||
return self.__step.run(runner)
|
||||
|
||||
|
||||
if platform.system() != "Windows":
|
||||
from httprunner.step_thrift_request import (
|
||||
RunThriftRequest,
|
||||
StepThriftRequestValidation,
|
||||
StepThriftRequestExtraction,
|
||||
)
|
||||
|
||||
class Step(Step):
|
||||
def __init__(
|
||||
self,
|
||||
step: Union[
|
||||
StepRequestValidation,
|
||||
StepRequestExtraction,
|
||||
RequestWithOptionalArgs,
|
||||
StepRefCase,
|
||||
RunSqlRequest,
|
||||
StepSqlRequestValidation,
|
||||
StepSqlRequestExtraction,
|
||||
RunThriftRequest,
|
||||
StepThriftRequestValidation,
|
||||
StepThriftRequestExtraction,
|
||||
],
|
||||
):
|
||||
super().__init__(step)
|
||||
|
||||
Reference in New Issue
Block a user