Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5a9f445

Browse files
committed
test that you need to download files before initializing
1 parent 93cb7b7 commit 5a9f445

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

plotly/tests/test_core/test_offline/test_offline.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,13 @@ def test_downloading_file_saves_it_to_the_disk():
2828

2929
plotly.offline.download_plotlyjs(dummy_js_url)
3030
assert os.path.isfile(plotly.offline.PLOTLY_OFFLINE_BUNDLE) is True
31+
32+
33+
@raises(PlotlyError)
34+
def test_initializing_before_downloading_raises_an_error():
35+
try:
36+
os.remove(plotly.offline.PLOTLY_OFFLINE_BUNDLE)
37+
except OSError:
38+
pass
39+
40+
plotly.offline.init_notebook_mode()

0 commit comments

Comments
 (0)