Merge pull request #909 from cgohlke/patch-3

Fix test_novice.test_update_on_save failure on Windows
This commit is contained in:
Johannes Schönberger
2014-03-11 07:15:11 -04:00
+7 -3
View File
@@ -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():