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

Skip to content

Commit df29ddb

Browse files
committed
Updated tests which now raise errors (this is a good thing).
1 parent 09c7be9 commit df29ddb

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

plotly/tests/test_graph_objs/test_annotations.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
"""
88
from nose.tools import raises
99
from ...graph_objs.graph_objs import *
10-
from ...exceptions import (PlotlyDictKeyError, PlotlyDictValueError,
10+
from ...exceptions import (PlotlyError,
11+
PlotlyDictKeyError,
12+
PlotlyDictValueError,
1113
PlotlyDataTypeError, PlotlyListEntryError)
1214

1315

@@ -20,8 +22,9 @@ def test_trivial():
2022
assert Annotations() == list()
2123

2224

23-
def test_weird_instantiation(): # Python allows this...
24-
assert Annotations({}) == list({})
25+
@raises(PlotlyError)
26+
def test_weird_instantiation(): # Python allows this, but nonsensical for us.
27+
print Annotations({})
2528

2629

2730
def test_dict_instantiation():

plotly/tests/test_graph_objs/test_data.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
"""
88
from nose.tools import raises
99
from ...graph_objs.graph_objs import *
10-
from ...exceptions import (PlotlyDictKeyError, PlotlyDictValueError,
10+
from ...exceptions import (PlotlyError,
11+
PlotlyDictKeyError,
12+
PlotlyDictValueError,
1113
PlotlyDataTypeError, PlotlyListEntryError)
1214

1315

@@ -20,8 +22,9 @@ def test_trivial():
2022
assert Data() == list()
2123

2224

25+
@raises(PlotlyError)
2326
def test_weird_instantiation(): # Python allows this...
24-
assert Data({}) == list({})
27+
print Data({})
2528

2629

2730
def test_default_scatter():

plotly/tests/test_graph_objs/test_plotly_list.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ def test_trivial():
1414
assert PlotlyList() == list()
1515

1616

17+
@raises(PlotlyError)
1718
def test_weird_instantiation():
18-
assert PlotlyList({}) == list({})
19+
print PlotlyList({})
1920

2021

2122
@raises(PlotlyError)

0 commit comments

Comments
 (0)