8000 changed error responses so that 'None' doesn't show as a diff. · hughesadam87/python-api@192e7d3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 192e7d3

Browse files
committed
changed error responses so that 'None' doesn't show as a diff.
1 parent 6b80d0c commit 192e7d3

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

plotly/tests/test_get_figure/test_get_figure.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212

1313
# username for tests: 'plotlyimagetest'
14-
# password for account: 'password'
1514
# api_key for account: '786r5mecv0'
1615

1716

@@ -84,34 +83,40 @@ def is_trivial(obj):
8483
return False
8584
else:
8685
return True
86+
elif obj is None:
87+
return True
8788
else:
8889
return False
8990

9091

9192
def test_all():
93+
un = 'plotlyimagetest'
94+
ak = '786r5mecv0'
9295
run_test = True
9396
end_file = 49
9497
polar_plots = [], #[6, 7, 8]
9598
skip = range(0)
9699
if run_test:
97-
py.sign_in('plotlyimagetest', '786r5mecv0')
100+
py.sign_in(un, ak)
98101
file_id = 0
99102
while True:
100103
fig, fig_raw = None, None
101104
while (file_id in polar_plots) or (file_id in skip):
102-
print " skipping file number: {}".format(file_id)
105+
print " skipping: https://plot.ly/{}/{}".format(un, file_id)
103106
file_id += 1
107+
print "\n"
104108
try:
105-
print "testing file number: {}".format(file_id)
106-
print "######################\n\n"
109+
print "testing: https://plot.ly/{}/{}".format(un, file_id)
110+
print "###########################################\n\n"
107111
fig = py.get_figure('plotlyimagetest', str(file_id))
108112
fig_raw = py.get_figure('plotlyimagetest',
109113
str(file_id),
110114
raw=True)
111115
except exceptions.PlotlyError:
112116
pass
113117
if (fig is None) and (fig_raw is None):
114-
print " couldn't find file number: {}".format(file_id)
118+
print " couldn't find: https://plot.ly/{}/{}".format(un,
119+
file_id)
115120
else:
116121
compare_with_raw(fig, fig_raw, parents=['figure'])
117122
file_id += 1

0 commit comments

Comments
 (0)
0