File tree Expand file tree Collapse file tree 1 file changed +13
-15
lines changed
Expand file tree Collapse file tree 1 file changed +13
-15
lines changed Original file line number Diff line number Diff line change @@ -88,21 +88,19 @@ def mock_geopandas():
8888@pytest .fixture
8989def mock_matplotlib ():
9090 """Mock matplotlib functionality for chart testing"""
91- with (
92- mock .patch ("matplotlib.pyplot.subplots" ) as mock_subplots ,
93- mock .patch ("matplotlib.pyplot.bar" ) as mock_bar ,
94- mock .patch ("matplotlib.pyplot.pie" ) as mock_pie ,
95- ):
96- mock_fig , mock_ax = mock .Mock (), mock .Mock ()
97- mock_subplots .return_value = (mock_fig , mock_ax )
98-
99- yield {
100- "subplots" : mock_subplots ,
101- "bar" : mock_bar ,
102- "pie" : mock_pie ,
103- "fig" : mock_fig ,
104- "ax" : mock_ax ,
105- }
91+ with mock .patch ("matplotlib.pyplot.subplots" ) as mock_subplots :
92+ with mock .patch ("matplotlib.pyplot.bar" ) as mock_bar :
93+ with mock .patch ("matplotlib.pyplot.pie" ) as mock_pie :
94+ mock_fig , mock_ax = mock .Mock (), mock .Mock ()
95+ mock_subplots .return_value = (mock_fig , mock_ax )
96+
97+ yield {
98+ "subplots" : mock_subplots ,
99+ "bar" : mock_bar ,
100+ "pie" : mock_pie ,
101+ "fig" : mock_fig ,
102+ "ax" : mock_ax ,
103+ }
106104
107105
108106@pytest .fixture (autouse = True )
You can’t perform that action at this time.
0 commit comments