From 196d7e322189c7c0429acdc7c11c38d29f217f7d Mon Sep 17 00:00:00 2001 From: debugtalk Date: Fri, 3 Jan 2020 18:35:38 +0800 Subject: [PATCH] fix: unittest --- httprunner/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httprunner/utils.py b/httprunner/utils.py index 4d0aab86..01dd60d8 100644 --- a/httprunner/utils.py +++ b/httprunner/utils.py @@ -383,7 +383,7 @@ def create_scaffold(project_name): logger.color_print(msg, "BLUE") def create_file(path, file_content=""): - with open(path, 'w', encoding='utf-8') as f: + with io.open(path, 'w', encoding='utf-8') as f: f.write(file_content) msg = "created file: {}".format(path) logger.color_print(msg, "BLUE")