diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-07-21 01:41:30 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-07-21 01:41:30 (GMT) |
commit | 87cc0c329e9a5181534a9ca9e283669986a32900 (patch) | |
tree | 7cd81d3e13cfb22edd7a02167ddaa00647ea8b1d /Lib/test | |
parent | 3332778f3537cf4c0230146831446aa838a4169e (diff) | |
download | cpython-87cc0c329e9a5181534a9ca9e283669986a32900.zip cpython-87cc0c329e9a5181534a9ca9e283669986a32900.tar.gz cpython-87cc0c329e9a5181534a9ca9e283669986a32900.tar.bz2 |
Whitespace normalization, plus:
+ test_quopri.py relied on significant trailing spaces. Fixed.
+ test_dircache.py (still) doesn't work on Windows (directory mtime on
Windows doesn't work like it does on Unix).
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_dircache.py | 8 | ||||
-rw-r--r-- | Lib/test/test_os.py | 2 | ||||
-rw-r--r-- | Lib/test/test_quopri.py | 16 |
3 files changed, 13 insertions, 13 deletions
diff --git a/Lib/test/test_dircache.py b/Lib/test/test_dircache.py index d6e3c24..fa3fe57 100644 --- a/Lib/test/test_dircache.py +++ b/Lib/test/test_dircache.py @@ -31,15 +31,15 @@ class DircacheTests(unittest.TestCase): os.rmdir(fname) else: os.unlink(fname) - + def test_listdir(self): ## SUCCESSFUL CASES entries = dircache.listdir(self.tempdir) self.assertEquals(entries, []) # Check that cache is actually caching, not just passing through. - self.assert_(dircache.listdir(self.tempdir) is entries) - + self.assert_(dircache.listdir(self.tempdir) is entries) + # Sadly, dircache has the same granularity as stat.mtime, and so # can't notice any changes that occured within 1 sec of the last # time it examined a directory. @@ -48,7 +48,7 @@ class DircacheTests(unittest.TestCase): entries = dircache.listdir(self.tempdir) self.assertEquals(entries, ['test1']) self.assert_(dircache.listdir(self.tempdir) is entries) - + ## UNSUCCESSFUL CASES self.assertEquals(dircache.listdir(self.tempdir+"_nonexistent"), []) diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index c1889e1..470e347 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -52,7 +52,7 @@ class TemporaryFileTests(unittest.TestCase): if not hasattr(os, "tmpnam"): return self.check_tempfile(os.tmpnam()) - + run_unittest(TemporaryFileTests) diff --git a/Lib/test/test_quopri.py b/Lib/test/test_quopri.py index 4fc5f40..f79eb4e 100644 --- a/Lib/test/test_quopri.py +++ b/Lib/test/test_quopri.py @@ -5,7 +5,7 @@ from cStringIO import StringIO from quopri import * - + ENCSAMPLE = """\ Here's a bunch of special=20 @@ -25,8 +25,8 @@ characters... have fun! """ # First line ends with a space -DECSAMPLE = """\ -Here's a bunch of special +DECSAMPLE = "Here's a bunch of special \n" + \ +"""\ ¡¢£¤¥¦§¨© ª«¬®¯°±²³ @@ -44,7 +44,7 @@ characters... have fun! """ - + class QuopriTestCase(unittest.TestCase): # Each entry is a tuple of (plaintext, encoded string). These strings are # used in the "quotetabs=0" tests. @@ -103,15 +103,15 @@ zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz''') ('hello world', 'hello=20world'), ('hello\tworld', 'hello=09world'), ) - + def test_encodestring(self): for p, e in self.STRINGS: self.assert_(encodestring(p) == e) - + def test_decodestring(self): for p, e in self.STRINGS: self.assert_(decodestring(e) == p) - + def test_idempotent_string(self): for p, e in self.STRINGS: self.assert_(decodestring(encodestring(e)) == e) @@ -135,5 +135,5 @@ zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz''') self.assert_(encodestring(p, quotetabs=1) == e) self.assert_(decodestring(e) == p) - + test_support.run_unittest(QuopriTestCase) |