@@ -564,6 +564,14 @@ def test_nested(self, fig_test, fig_ref):
564
564
fig_test .tight_layout ()
565
565
fig_ref .tight_layout ()
566
566
567
+ @check_figures_equal (tol = 0.005 , extensions = ['png' ])
568
+ def test_nested_tuple (self , fig_test , fig_ref ):
569
+ x = [["A" , "B" , "B" ], ["C" , "C" , "D" ]]
570
+ xt = (("A" , "B" , "B" ), ("C" , "C" , "D" ))
571
+
572
+ fig_ref .build_grid ([["F" ], [x ]])
573
+ fig_test .build_grid ([["F" ], [xt ]])
574
+
567
575
@check_figures_equal (extensions = ['png' ])
568
576
@pytest .mark .parametrize ('x, empty_sentinel' , [
569
577
([["A" , None ], [None , "B" ]], None ),
@@ -645,3 +653,16 @@ def test_fail(self, x, match):
645
653
ValueError ,
646
654
match = match ):
647
655
fig .build_grid (x )
656
+
657
+ @check_figures_equal (extensions = ['png' ])
658
+ def test_hashable_keys (self , fig_test , fig_ref ):
659
+ fig_test .build_grid ([[object (), object ()]])
660
+ fig_ref .build_grid ([['A' , 'B' ]])
661
+
662
+ @check_figures_equal (extensions = ['png' ])
663
+ def test_mixed (self , fig_test , fig_ref ):
664
+ for k , ax in fig_ref .build_grid ([['A' , None , 'B' ]]).items ():
665
+ ax .set_title (k )
666
+ ax = fig_test .subplots ()
667
+ ax .set_title ('B' )
668
+ fig_test .build_grid ([['A' , None , ax ]])['A' ].set_title ('A' )
0 commit comments