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

Skip to content

Commit bdb8682

Browse files
committed
TST: Close figures before image comparison.
Since this decorator assumes that the figures available after are the ones to check, it should close any existing figures or it will get the wrong count.
1 parent 0cab7c6 commit bdb8682

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/matplotlib/testing/decorators.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ def delayed_init(self, func):
252252

253253
def setup(self):
254254
func = self.func
255+
plt.close('all')
255256
self.setup_class()
256257
try:
257258
matplotlib.style.use(self.style)

0 commit comments

Comments
 (0)