mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-04 19:07:50 +08:00
Merge pull request #909 from cgohlke/patch-3
Fix test_novice.test_update_on_save failure on Windows
This commit is contained in:
@@ -111,12 +111,16 @@ def test_update_on_save():
|
||||
assert pic.modified
|
||||
assert pic.path is None
|
||||
|
||||
with tempfile.NamedTemporaryFile(suffix=".jpg") as tmp:
|
||||
pic.save(tmp.name)
|
||||
fd, filename = tempfile.mkstemp(suffix=".jpg")
|
||||
os.close(fd)
|
||||
try:
|
||||
pic.save(filename)
|
||||
|
||||
assert not pic.modified
|
||||
assert_equal(pic.path, os.path.abspath(tmp.name))
|
||||
assert_equal(pic.path, os.path.abspath(filename))
|
||||
assert_equal(pic.format, "jpeg")
|
||||
finally:
|
||||
os.unlink(filename)
|
||||
|
||||
|
||||
def test_indexing():
|
||||
|
||||
Reference in New Issue
Block a user