test:add special compatibility testcase for code coverage
This commit is contained in:
parent
2dcec8304a
commit
f1b606c730
|
@ -1862,7 +1862,7 @@ class TDCom:
|
|||
time.sleep(1)
|
||||
return tbname
|
||||
|
||||
def is_json(msg):
|
||||
def is_json(msg):
|
||||
if isinstance(msg, str):
|
||||
try:
|
||||
json.loads(msg)
|
||||
|
@ -1872,7 +1872,7 @@ class TDCom:
|
|||
else:
|
||||
return False
|
||||
|
||||
def get_path(tool="taosd"):
|
||||
def get_path(tool="taosd"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
if ("community" in selfPath):
|
||||
projPath = selfPath[:selfPath.find("community")]
|
||||
|
@ -1890,7 +1890,7 @@ class TDCom:
|
|||
return ""
|
||||
return paths[0]
|
||||
|
||||
def dict2toml(in_dict: dict, file:str):
|
||||
def dict2toml(in_dict: dict, file:str):
|
||||
if not isinstance(in_dict, dict):
|
||||
return ""
|
||||
with open(file, 'w') as f:
|
||||
|
|
Loading…
Reference in New Issue