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):
23
23
pass
24
24
25
25
26
+ ## Would Cause Server Errors ##
27
+
28
+ class PlotlyEmptyDataError (PlotlyError ):
29
+ pass
30
+
31
+
26
32
## Graph Objects Errors ##
27
33
28
34
class PlotlyGraphObjectError (PlotlyError ):
Original file line number Diff line number Diff line change 7
7
"""
8
8
from __future__ import absolute_import
9
9
from nose .tools import raises
10
+ from unittest import TestCase
10
11
11
12
from plotly .graph_objs import graph_objs
12
13
from plotly .plotly import plotly as py
13
- from plotly .exceptions import PlotlyError
14
+ from plotly .exceptions import PlotlyError , PlotlyEmptyDataError
14
15
15
16
16
17
# username for tests: 'PlotlyImageTest'
@@ -57,6 +58,14 @@ def test_plot_invalid_args_2():
57
58
filename = 'plot_invalid' )
58
59
59
60
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
+
60
69
def test_bar ():
61
70
pass
62
71
You can’t perform that action at this time.
0 commit comments