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

Skip to content

Commit ea7b888

Browse files
committed
Update test_optional tests for v4 behavior
1 parent 845b8e2 commit ea7b888

File tree

13 files changed

+154
-266
lines changed

13 files changed

+154
-266
lines changed

plotly/figure_factory/_facet_grid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from plotly import exceptions, optional_imports
44
import plotly.colors as clrs
55
from plotly.figure_factory import utils
6-
from plotly.tools import make_subplots
6+
from plotly.subplots import make_subplots
77

88
import math
99
from numbers import Number

plotly/tests/test_core/test_graph_objs/test_figure.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
11
from __future__ import absolute_import
22

3-
from unittest import TestCase
4-
53
import plotly.graph_objs as go
6-
import plotly.io as pio
7-
8-
9-
class FigureTest(TestCase):
4+
from plotly.tests.utils import TestCaseNoTemplate
105

11-
def setUp(self):
12-
pio.templates.default = None
136

14-
def tearDown(self):
15-
pio.templates.default = 'plotly'
7+
class FigureTest(TestCaseNoTemplate):
168

179
def test_instantiation(self):
1810

plotly/tests/test_core/test_graph_objs/test_template.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import plotly.io as pio
88
import plotly.graph_objs as go
9+
from plotly.tests.utils import TestCaseNoTemplate
910

1011

1112
class TemplateTest(TestCase):
@@ -169,13 +170,7 @@ def test_template_iter(self):
169170
self.assertIn('test_template', set(pio.templates))
170171

171172

172-
class TestToTemplated(TestCase):
173-
174-
def setUp(self):
175-
pio.templates.default = None
176-
177-
def tearDown(self):
178-
pio.templates.default = 'plotly'
173+
class TestToTemplated(TestCaseNoTemplate):
179174

180175
def test_move_layout_nested_properties(self):
181176
fig = go.Figure(layout={'font': {'family': 'Courier New'},

plotly/tests/test_core/test_graph_objs/test_to_ordered_dict.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
11
from __future__ import absolute_import
22

3-
from unittest import TestCase
43
import plotly.graph_objs as go
54
from collections import OrderedDict
6-
import plotly.io as pio
5+
from plotly.tests.utils import TestCaseNoTemplate
76

87

9-
class FigureTest(TestCase):
10-
def setUp(self):
11-
pio.templates.default = None
12-
13-
def tearDown(self):
14-
pio.templates.default = 'plotly'
8+
class FigureTest(TestCaseNoTemplate):
159

1610
def test_to_ordered_dict(self):
1711

0 commit comments

Comments
 (0)