File tree Expand file tree Collapse file tree 1 file changed +17
-10
lines changed
plotly/tests/test_core/test_get_figure Expand file tree Collapse file tree 1 file changed +17
-10
lines changed Original file line number Diff line number Diff line change 1313import json
1414
1515from unittest import TestCase
16- from unittest import skipIf
16+
17+ version = six .sys .version_info [:2 ] # need this for conditional testing
1718
1819
1920# username for tests: 'plotlyimagetest'
@@ -198,12 +199,18 @@ def test_all():
198199
199200class TestBytesVStrings (TestCase ):
200201
201- @skipIf (not six .PY3 , 'Decoding and missing escapes is only seen in PY3' )
202- def test_proper_escaping (self ):
203- un = 'PlotlyImageTest'
204- ak = '786r5mecv0'
205- url = "https://plot.ly/~PlotlyImageTest/91/"
206- py .sign_in (un , ak )
207- print ("getting: https://plot.ly/~PlotlyImageTest/91/" )
208- print ("###########################################\n \n " )
209- fig = py .get_figure (url )
202+ # unittest `skipIf` not supported in 2.6
203+ if version < (2 , 7 ) or (2 , 7 ) < version < (3 , 3 ):
204+ pass
205+ else :
206+ from unittest import skipIf
207+
208+ @skipIf (not six .PY3 , 'Decoding and missing escapes only seen in PY3' )
209+ def test_proper_escaping (self ):
210+ un = 'PlotlyImageTest'
211+ ak = '786r5mecv0'
212+ url = "https://plot.ly/~PlotlyImageTest/91/"
213+ py .sign_in (un , ak )
214+ print ("getting: https://plot.ly/~PlotlyImageTest/91/" )
215+ print ("###########################################\n \n " )
216+ fig = py .get_figure (url )
You can’t perform that action at this time.
0 commit comments