Kaydet (Commit) 6626c1f1 authored tarafından Tim Peters's avatar Tim Peters

create_message(): When os.link() doesn't exist, make a copy of the msg

instead.  Allows this test to finish on Windows again.
üst ffd674d4
......@@ -49,7 +49,12 @@ class MaildirTestCase(unittest.TestCase):
self._msgfiles.append(tmpname)
fp.write(DUMMY_MESSAGE)
fp.close()
os.link(tmpname, newname)
if hasattr(os, "link"):
os.link(tmpname, newname)
else:
fp = open(newname, "w")
fp.write(DUMMY_MESSAGE)
fp.close()
self._msgfiles.append(newname)
def test_empty_maildir(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment