diff options
author | Guido van Rossum <guido@python.org> | 2007-05-07 22:24:25 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-05-07 22:24:25 (GMT) |
commit | 805365ee39298f93e433e19ae0dd87c6f782145b (patch) | |
tree | ae8f8a3c315b49cfb2e7926d4b7e56f64c68b21c /Lib/test/test_mailbox.py | |
parent | 598d98a7e8981e650e803e41e884ffc905b2311e (diff) | |
download | cpython-805365ee39298f93e433e19ae0dd87c6f782145b.zip cpython-805365ee39298f93e433e19ae0dd87c6f782145b.tar.gz cpython-805365ee39298f93e433e19ae0dd87c6f782145b.tar.bz2 |
Merged revisions 55007-55179 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/p3yk
........
r55077 | guido.van.rossum | 2007-05-02 11:54:37 -0700 (Wed, 02 May 2007) | 2 lines
Use the new print syntax, at least.
........
r55142 | fred.drake | 2007-05-04 21:27:30 -0700 (Fri, 04 May 2007) | 1 line
remove old cruftiness
........
r55143 | fred.drake | 2007-05-04 21:52:16 -0700 (Fri, 04 May 2007) | 1 line
make this work with the new Python
........
r55162 | neal.norwitz | 2007-05-06 22:29:18 -0700 (Sun, 06 May 2007) | 1 line
Get asdl code gen working with Python 2.3. Should continue to work with 3.0
........
r55164 | neal.norwitz | 2007-05-07 00:00:38 -0700 (Mon, 07 May 2007) | 1 line
Verify checkins to p3yk (sic) branch go to 3000 list.
........
r55166 | neal.norwitz | 2007-05-07 00:12:35 -0700 (Mon, 07 May 2007) | 1 line
Fix this test so it runs again by importing warnings_test properly.
........
r55167 | neal.norwitz | 2007-05-07 01:03:22 -0700 (Mon, 07 May 2007) | 8 lines
So long xrange. range() now supports values that are outside
-sys.maxint to sys.maxint. floats raise a TypeError.
This has been sitting for a long time. It probably has some problems and
needs cleanup. Objects/rangeobject.c now uses 4-space indents since
it is almost completely new.
........
r55171 | guido.van.rossum | 2007-05-07 10:21:26 -0700 (Mon, 07 May 2007) | 4 lines
Fix two tests that were previously depending on significant spaces
at the end of a line (and before that on Python 2.x print behavior
that has no exact equivalent in 3.0).
........
Diffstat (limited to 'Lib/test/test_mailbox.py')
-rw-r--r-- | Lib/test/test_mailbox.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Lib/test/test_mailbox.py b/Lib/test/test_mailbox.py index 1972ca3..84a9e5c 100644 --- a/Lib/test/test_mailbox.py +++ b/Lib/test/test_mailbox.py @@ -208,7 +208,7 @@ class TestMailbox(TestBase): for value in method(): self.fail("Not empty") keys, values = [], [] - for i in xrange(repetitions): + for i in range(repetitions): keys.append(self._box.add(self._template % i)) values.append(self._template % i) if do_keys and not do_values: @@ -254,11 +254,11 @@ class TestMailbox(TestBase): def test_len(self, repetitions=10): # Get message count keys = [] - for i in xrange(repetitions): + for i in range(repetitions): self.assert_(len(self._box) == i) keys.append(self._box.add(self._template % i)) self.assert_(len(self._box) == i + 1) - for i in xrange(repetitions): + for i in range(repetitions): self.assert_(len(self._box) == repetitions - i) self._box.remove(keys[i]) self.assert_(len(self._box) == repetitions - i - 1) @@ -293,7 +293,7 @@ class TestMailbox(TestBase): def test_clear(self, iterations=10): # Remove all messages using clear() keys = [] - for i in xrange(iterations): + for i in range(iterations): self._box.add(self._template % i) for i, key in enumerate(keys): self.assert_(self._box.get_string(key) == self._template % i) @@ -323,10 +323,10 @@ class TestMailbox(TestBase): def test_popitem(self, iterations=10): # Get and remove an arbitrary (key, message) using popitem() keys = [] - for i in xrange(10): + for i in range(10): keys.append(self._box.add(self._template % i)) seen = [] - for i in xrange(10): + for i in range(10): key, msg = self._box.popitem() self.assert_(key in keys) self.assert_(key not in seen) @@ -387,7 +387,7 @@ class TestMailbox(TestBase): self._test_flush_or_close(self._box.close) def _test_flush_or_close(self, method): - contents = [self._template % i for i in xrange(3)] + contents = [self._template % i for i in range(3)] self._box.add(contents[0]) self._box.add(contents[1]) self._box.add(contents[2]) @@ -599,7 +599,7 @@ class TestMaildir(TestMailbox): pattern = re.compile(r"(?P<time>\d+)\.M(?P<M>\d{1,6})P(?P<P>\d+)" r"Q(?P<Q>\d+)\.(?P<host>[^:/]+)") previous_groups = None - for x in xrange(repetitions): + for x in range(repetitions): tmp_file = self._box._create_tmp() head, tail = os.path.split(tmp_file.name) self.assertEqual(head, os.path.abspath(os.path.join(self._path, @@ -703,7 +703,7 @@ class _TestMboxMMDF(TestMailbox): def test_open_close_open(self): # Open and inspect previously-created mailbox - values = [self._template % i for i in xrange(3)] + values = [self._template % i for i in range(3)] for value in values: self._box.add(value) self._box.close() @@ -718,7 +718,7 @@ class _TestMboxMMDF(TestMailbox): def test_add_and_close(self): # Verifying that closing a mailbox doesn't change added items self._box.add(_sample_message) - for i in xrange(3): + for i in range(3): self._box.add(self._template % i) self._box.add(_sample_message) self._box._file.flush() |