Skip to content

Commit

Permalink
Merge pull request #111 from chinapnr/jiachunying_20180803
Browse files Browse the repository at this point in the history
2018.9.3 v1.1.0, modify 'encode' to 'encoding'
  • Loading branch information
itaa committed Sep 3, 2018
2 parents 7e39de3 + 9de574e commit 7a72253
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def test_config_dict_04(self):
conf_filename = './test/test_conf.ini'

# 读取配置文件, 中文编码
ds = conf_as_dict(conf_filename, encode='utf-8')
ds = conf_as_dict(conf_filename, encoding='utf-8')
d = ds[1]

list1 = ['show_opt', 'show_opt_common', 'show_opt_common2', 'get_args', 'show_rule_pattern',
Expand Down
4 changes: 2 additions & 2 deletions test/test_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def test_csv_02(self):
with io.open(csv_file_name, 'w', encoding='utf8') as f:
f.write(csv_content)
f.close()
result = csv_file_to_list(csv_file_name, encode='utf-8')
result = csv_file_to_list(csv_file_name, encoding='utf-8')
shutil.rmtree(os.path.dirname(csv_file_name))
assert len(result) == 2
assert len(result[0]) == 2
Expand All @@ -54,7 +54,7 @@ def test_csv_03(self):
with io.open(csv_file_name, 'w', encoding='gbk') as f:
f.write(csv_content)
f.close()
result = csv_file_to_list(csv_file_name, encode='gbk')
result = csv_file_to_list(csv_file_name, encoding='gbk')
shutil.rmtree(os.path.dirname(csv_file_name))
assert len(result) == 2
assert len(result[0]) == 2
Expand Down

0 comments on commit 7a72253

Please sign in to comment.