File tree 1 file changed +16
-2
lines changed
packages/python/plotly/plotly/tests/test_core/test_subplots
1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -660,6 +660,22 @@ def test_specs_padding(self):
660
660
)
661
661
self .assertEqual (fig .to_plotly_json (), expected .to_plotly_json ())
662
662
663
+ def test_specs_rounding_rounds_down (self ):
664
+ n_subplots = 8
665
+ padding_size = 0.2
666
+
667
+ specs = []
668
+ for _ in range (n_subplots ):
669
+ specs .append ([{"b" : padding_size / 2.0 , "t" : padding_size / 2.0 }])
670
+
671
+ fig = tls .make_subplots (rows = n_subplots , specs = specs )
672
+ self .assertTrue (
673
+ all (
674
+ fig .layout [f"yaxis{ i if i > 1 else '' } " ]["domain" ][0 ] <= 1.0
675
+ for i in range (1 , n_subplots + 1 )
676
+ )
677
+ )
678
+
663
679
def test_specs_padding_bottom_left (self ):
664
680
expected = Figure (
665
681
data = Data (),
@@ -1592,7 +1608,6 @@ def test_large_columns_no_errors(self):
1592
1608
)
1593
1609
1594
1610
def test_row_width_and_column_width (self ):
1595
-
1596
1611
expected = Figure (
1597
1612
{
1598
1613
"data" : [],
@@ -1680,7 +1695,6 @@ def test_row_width_and_column_width(self):
1680
1695
self .assertEqual (fig .to_plotly_json (), expected .to_plotly_json ())
1681
1696
1682
1697
def test_row_width_and_shared_yaxes (self ):
1683
-
1684
1698
expected = Figure (
1685
1699
{
1686
1700
"data" : [],
You can’t perform that action at this time.
0 commit comments