|
11 | 11 |
|
12 | 12 |
|
13 | 13 | # username for tests: 'plotlyimagetest'
|
14 |
| -# password for account: 'password' |
15 | 14 | # api_key for account: '786r5mecv0'
|
16 | 15 |
|
17 | 16 |
|
@@ -84,34 +83,40 @@ def is_trivial(obj):
|
84 | 83 | return False
|
85 | 84 | else:
|
86 | 85 | return True
|
| 86 | + elif obj is None: |
| 87 | + return True |
87 | 88 | else:
|
88 | 89 | return False
|
89 | 90 |
|
90 | 91 |
|
91 | 92 | def test_all():
|
| 93 | + un = 'plotlyimagetest' |
| 94 | + ak = '786r5mecv0' |
92 | 95 | run_test = True
|
93 | 96 | end_file = 49
|
94 | 97 | polar_plots = [], #[6, 7, 8]
|
95 | 98 | skip = range(0)
|
96 | 99 | if run_test:
|
97 |
| - py.sign_in('plotlyimagetest', '786r5mecv0') |
| 100 | + py.sign_in(un, ak) |
98 | 101 | file_id = 0
|
99 | 102 | while True:
|
100 | 103 | fig, fig_raw = None, None
|
101 | 104 | 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) |
103 | 106 | file_id += 1
|
| 107 | + print "\n" |
104 | 108 | 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" |
107 | 111 | fig = py.get_figure('plotlyimagetest', str(file_id))
|
108 | 112 | fig_raw = py.get_figure('plotlyimagetest',
|
109 | 113 | str(file_id),
|
110 | 114 | raw=True)
|
111 | 115 | except exceptions.PlotlyError:
|
112 | 116 | pass
|
113 | 117 | 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) |
115 | 120 | else:
|
116 | 121 | compare_with_raw(fig, fig_raw, parents=['figure'])
|
117 | 122 | file_id += 1
|
|
0 commit comments