File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
tests/test_core/test_plotly Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,12 @@ class PlotlyError(Exception):
2323 pass
2424
2525
26+ ## Would Cause Server Errors ##
27+
28+ class PlotlyEmptyDataError (PlotlyError ):
29+ pass
30+
31+
2632## Graph Objects Errors ##
2733
2834class PlotlyGraphObjectError (PlotlyError ):
Original file line number Diff line number Diff line change 77"""
88from __future__ import absolute_import
99from nose .tools import raises
10+ from unittest import TestCase
1011
1112from plotly .graph_objs import graph_objs
1213from plotly .plotly import plotly as py
13- from plotly .exceptions import PlotlyError
14+ from plotly .exceptions import PlotlyError , PlotlyEmptyDataError
1415
1516
1617# username for tests: 'PlotlyImageTest'
@@ -57,6 +58,14 @@ def test_plot_invalid_args_2():
5758 filename = 'plot_invalid' )
5859
5960
61+ class TestPlot (TestCase ):
62+
63+ def test_plot_empty_data (self ):
64+ py .sign_in ('PlotlyImageTest' , '786r5mecv0' )
65+ with self .assertRaises (PlotlyEmptyDataError ):
66+ py .plot ([], filename = 'plot_invalid' )
67+
68+
6069def test_bar ():
6170 pass
6271
You can’t perform that action at this time.
0 commit comments