Commit Graph

14 Commits

Author SHA1 Message Date
Andrew M. Kuchling 214db63df8 Use open() instead of file() 2006-05-02 21:44:33 +00:00
Guido van Rossum b2045837b6 Hopefully this will fix the spurious failures of test_mailbox.py that I'm
experiencing.  (This code and mailbox.py itself are full of calls to file()
that should be calls to open() -- but I'm not fixing those.)
2006-05-02 20:47:36 +00:00
Tim Peters 6d7cd7d6f4 Whitespace normalization. 2006-04-22 05:52:59 +00:00
Andrew M. Kuchling 1da4a94719 Add Gregory K. Johnson's revised version of mailbox.py (funded by
the 2005 Summer of Code).

The revision adds a number of new mailbox classes that support adding
and removing messages; these classes also support mailbox locking and
default to using email.Message instead of rfc822.Message.

The old mailbox classes are largely left alone for backward compatibility.
The exception is the Maildir class, which was present in the old module
and now inherits from the new classes.  The Maildir class's interface
is pretty simple, though, so I think it'll be compatible with existing
code.

(The change to the NEWS file also adds a missing word to a different
news item, which unfortunately required rewrapping the line.)
2006-04-22 02:32:43 +00:00
Skip Montanaro 5253da163c added test for bug #996359. 2004-07-24 19:56:03 +00:00
Barry Warsaw 04f357cffe Get rid of relative imports in all unittests. Now anything that
imports e.g. test_support must do so using an absolute package name
such as "import test.test_support" or "from test import test_support".

This also updates the README in Lib/test, and gets rid of the
duplicate data dirctory in Lib/test/data (replaced by
Lib/email/test/data).

Now Tim and Jack can have at it. :)
2002-07-23 19:04:11 +00:00
Guido van Rossum e2ae77b8b8 SF patch #474590 -- RISC OS support 2001-10-24 20:42:55 +00:00
Fred Drake 2e2be3760c Change the PyUnit-based tests to use the test_main() approach. This
allows using the tests with unittest.py as a script.  The tests will
still run when run as a script themselves.
2001-09-20 21:33:42 +00:00
Jack Jansen 97df7b61f2 The test used int(time.time()) to get a random number, but this doesn't work on the mac (where times are bigger than ints). Changed to int(time.time()%1000000). 2001-06-19 20:20:05 +00:00
Tim Peters 6626c1f183 create_message(): When os.link() doesn't exist, make a copy of the msg
instead.  Allows this test to finish on Windows again.
2001-05-22 16:29:01 +00:00
Fred Drake c02bc3e819 Re-write the mailbox test suite to use PyUnit. Cover a lot more ground
for the Maildir mailbox format.  This still does not address other mailbox
formats.
2001-05-21 20:23:21 +00:00
Guido van Rossum 75ebb29f88 Some other tests, when failing, don't always remove their TESTFN file.
Try to do it for them, so our mkdir() operation doesn't fail.
2001-04-10 15:01:20 +00:00
Guido van Rossum ca956e2e47 When catching errors from os.rmdir(), test for os.error, not IOError! 2001-03-02 05:46:17 +00:00
Fred Drake 0aaed272a7 Added test for regression on SourceForge bug #117490. 2000-10-23 13:39:15 +00:00