mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-05 07:49:37 +08:00
refactor: remove unused code
This commit is contained in:
@@ -383,18 +383,11 @@ def create_scaffold(project_name):
|
|||||||
logger.color_print(msg, "BLUE")
|
logger.color_print(msg, "BLUE")
|
||||||
|
|
||||||
def create_file(path, file_content=""):
|
def create_file(path, file_content=""):
|
||||||
with open(path, 'w') as f:
|
with open(path, 'w', encoding='utf-8') as f:
|
||||||
f.write(file_content)
|
f.write(file_content)
|
||||||
msg = "created file: {}".format(path)
|
msg = "created file: {}".format(path)
|
||||||
logger.color_print(msg, "BLUE")
|
logger.color_print(msg, "BLUE")
|
||||||
|
|
||||||
def create_path(path, ptype, file_content=""):
|
|
||||||
if ptype == "folder":
|
|
||||||
os.makedirs(path)
|
|
||||||
elif ptype == "file":
|
|
||||||
with open(path, 'w') as f:
|
|
||||||
f.write(file_content)
|
|
||||||
|
|
||||||
demo_api_content = """
|
demo_api_content = """
|
||||||
name: demo api
|
name: demo api
|
||||||
variables:
|
variables:
|
||||||
|
|||||||
Reference in New Issue
Block a user