@@ -130,31 +130,31 @@ def test_one_ohlc(self):
130
130
131
131
# This should create one "increase" (i.e. close > open) ohlc stick
132
132
133
- ohlc_incr = tls .FigureFactory .create_ohlc (open = [33.0 ],
134
- high = [33.2 ],
135
- low = [32.7 ],
136
- close = [33.1 ])
137
-
138
- expected_ohlc_incr = {'layout' : {'hovermode' : 'closest' ,
139
- 'xaxis' : {'zeroline' : False }},
140
- 'data' : [{'y' : [33.0 , 33.0 , 33.2 , 32.7 ,
141
- 33.1 , 33.1 , None ],
142
- 'line' : {'width' : 1 ,
143
- 'color' : '#3D9970' },
144
- 'showlegend' : False ,
145
- 'name' : 'Increasing' ,
146
- 'text' : ('Open' , 'Open' , 'High' , 'Low' ,
147
- 'Close' , 'Close' , '' ),
148
- 'mode' : 'lines' , 'type' : 'scatter' ,
149
- 'x' : [- 0.2 , 0 , 0 , 0 , 0 , 0.2 , None ]},
150
- {'y' : [], 'line' : {'width' : 1 ,
151
- 'color' : '#FF4136' },
152
- 'showlegend' : False ,
153
- 'name' : 'Decreasing' , 'text' : (),
154
- 'mode' : 'lines' , 'type' : 'scatter' ,
155
- 'x' : []}]}
156
-
157
- self .assertEqual (ohlc_incr , expected_ohlc_incr )
133
+ ohlc = tls .FigureFactory .create_ohlc (open = [33.0 ],
134
+ high = [33.2 ],
135
+ low = [32.7 ],
136
+ close = [33.1 ])
137
+
138
+ expected_ohlc = {'layout' : {'hovermode' : 'closest' ,
139
+ 'xaxis' : {'zeroline' : False }},
140
+ 'data' : [{'y' : [33.0 , 33.0 , 33.2 , 32.7 ,
141
+ 33.1 , 33.1 , None ],
142
+ 'line' : {'width' : 1 ,
143
+ 'color' : '#3D9970' },
144
+ 'showlegend' : False ,
145
+ 'name' : 'Increasing' ,
146
+ 'text' : ('Open' , 'Open' , 'High' , 'Low' ,
147
+ 'Close' , 'Close' , '' ),
148
+ 'mode' : 'lines' , 'type' : 'scatter' ,
149
+ 'x' : [- 0.2 , 0 , 0 , 0 , 0 , 0.2 , None ]},
150
+ {'y' : [], 'line' : {'width' : 1 ,
151
+ 'color' : '#FF4136' },
152
+ 'showlegend' : False ,
153
+ 'name' : 'Decreasing' , 'text' : (),
154
+ 'mode' : 'lines' , 'type' : 'scatter' ,
155
+ 'x' : []}]}
156
+
157
+ self .assertEqual (ohlc , expected_ohlc )
158
158
159
159
def test_one_ohlc_increase (self ):
160
160
@@ -294,11 +294,11 @@ def test_datetime_ohlc(self):
294
294
datetime .datetime (year = 2014 , month = 9 , day = 4 ),
295
295
datetime .datetime (year = 2014 , month = 12 , day = 5 )]
296
296
297
- ohlc = tls .FigureFactory .create_ohlc (open_data , high_data ,
298
- low_data , close_data ,
299
- dates = x )
297
+ ohlc_d = tls .FigureFactory .create_ohlc (open_data , high_data ,
298
+ low_data , close_data ,
299
+ dates = x )
300
300
301
- expe_ohlc = {'data' : [{'line' : {'color' : '#3D9970' , 'width' : 1 },
301
+ ex_ohlc_d = {'data' : [{'line' : {'color' : '#3D9970' , 'width' : 1 },
302
302
'mode' : 'lines' ,
303
303
'name' : 'Increasing' ,
304
304
'showlegend' : False ,
@@ -478,7 +478,7 @@ def test_datetime_ohlc(self):
478
478
None ]}],
479
479
'layout' : {'hovermode' : 'closest' ,
480
480
'xaxis' : {'zeroline' : False }}}
481
- self .assertEqual (ohlc , expe_ohlc )
481
+ self .assertEqual (ohlc_d , ex_ohlc_d )
482
482
483
483
def test_datetime_candlestick (self ):
484
484
0 commit comments