8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d30134f commit 85f472aCopy full SHA for 85f472a
lib/matplotlib/tests/test_backend_bases.py
@@ -78,9 +78,10 @@ def test_get_default_filename_already_exists():
78
canvas = FigureCanvasBase(fig)
79
80
# create 'image.png' in figure's save dir
81
- with open(os.path.join(test_dir, 'image.png'), 'a'):
82
- filename = canvas.get_default_filename()
83
- assert_equal(filename, 'image-1.png')
+ open(os.path.join(test_dir, 'image.png'), 'w').close()
+
+ filename = canvas.get_default_filename()
84
+ assert_equal(filename, 'image-1.png')
85
finally:
86
shutil.rmtree(test_dir)
87
0 commit comments