Skip to content

Commit 5c8f9c1

Browse files
committed
Some more ‘{}’ -> ‘{0}’, etc.
1 parent c17a717 commit 5c8f9c1

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

plotly/tests/test_core/test_file/test_file.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def test_create_folder():
3636
@with_setup(init)
3737
def test_create_nested_folders():
3838
first_folder = _random_filename()
39-
nested_folder = '{}/{}'.format(first_folder, _random_filename())
39+
nested_folder = '{0}/{1}'.format(first_folder, _random_filename())
4040
py.file_ops.mkdirs(nested_folder)
4141

4242

plotly/tests/test_core/test_graph_objs/nose_tools.py

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,30 @@
1010
def compare_dict(dict1, dict2, equivalent=True, msg='', tol=10e-8):
1111
for key in dict1:
1212
if key not in dict2:
13-
return False, "{} should be {}".format(list(dict1.keys()), list(dict2.keys()))
13+
return (False,
14+
"{0} should be {1}".format(
15+
list(dict1.keys()), list(dict2.keys())))
1416
for key in dict1:
1517
if isinstance(dict1[key], dict):
1618
equivalent, msg = compare_dict(dict1[key],
1719
dict2[key],
1820
tol=tol)
1921
elif isinstance(dict1[key], Num) and isinstance(dict2[key], Num):
2022
if not comp_nums(dict1[key], dict2[key], tol):
21-
return False, "['{}'] = {} should be {}".format(key,
22-
dict1[key],
23-
dict2[key])
23+
return False, "['{0}'] = {1} should be {2}".format(key,
24+
dict1[key],
25+
dict2[key])
2426
elif is_num_list(dict1[key]) and is_num_list(dict2[key]):
2527
if not comp_num_list(dict1[key], dict2[key], tol):
26-
return False, "['{}'] = {} should be {}".format(key,
27-
dict1[key],
28-
dict2[key])
28+
return False, "['{0}'] = {1} should be {2}".format(key,
29+
dict1[key],
30+
dict2[key])
2931
elif not (dict1[key] == dict2[key]):
30-
return False, "['{}'] = {} should be {}".format(key,
31-
dict1[key],
32-
dict2[key])
32+
return False, "['{0}'] = {1} should be {2}".format(key,
33+
dict1[key],
34+
dict2[key])
3335
if not equivalent:
34-
return False, "['{}']".format(key) + msg
36+
return False, "['{0}']".format(key) + msg
3537
return equivalent, msg
3638

3739

0 commit comments

Comments
 (0)