summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_mailbox.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/test/test_mailbox.py b/Lib/test/test_mailbox.py
index 9858459..b9887ca 100644
--- a/Lib/test/test_mailbox.py
+++ b/Lib/test/test_mailbox.py
@@ -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):