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)
|
time.sleep(1)
|
||||||
return tbname
|
return tbname
|
||||||
|
|
||||||
def is_json(msg):
|
def is_json(msg):
|
||||||
if isinstance(msg, str):
|
if isinstance(msg, str):
|
||||||
try:
|
try:
|
||||||
json.loads(msg)
|
json.loads(msg)
|
||||||
|
@ -1872,7 +1872,7 @@ class TDCom:
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def get_path(tool="taosd"):
|
def get_path(tool="taosd"):
|
||||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||||
if ("community" in selfPath):
|
if ("community" in selfPath):
|
||||||
projPath = selfPath[:selfPath.find("community")]
|
projPath = selfPath[:selfPath.find("community")]
|
||||||
|
@ -1890,7 +1890,7 @@ class TDCom:
|
||||||
return ""
|
return ""
|
||||||
return paths[0]
|
return paths[0]
|
||||||
|
|
||||||
def dict2toml(in_dict: dict, file:str):
|
def dict2toml(in_dict: dict, file:str):
|
||||||
if not isinstance(in_dict, dict):
|
if not isinstance(in_dict, dict):
|
||||||
return ""
|
return ""
|
||||||
with open(file, 'w') as f:
|
with open(file, 'w') as f:
|
||||||
|
|
Loading…
Reference in New Issue