[Python-checkins] CVS: python/dist/src/Lib/test test_dircache.py,1.1,1.2 test_os.py,1.2,1.3 test_quopri.py,1.2,1.3
Tim Peters
tim_one@users.sourceforge.net
2001年7月20日 18:41:33 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv1985/python/dist/src/Lib/test
Modified Files:
test_dircache.py test_os.py test_quopri.py
Log Message:
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).
Index: test_dircache.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_dircache.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** test_dircache.py 2001年07月19日 22:59:09 1.1
--- test_dircache.py 2001年07月21日 01:41:30 1.2
***************
*** 32,36 ****
else:
os.unlink(fname)
!
def test_listdir(self):
## SUCCESSFUL CASES
--- 32,36 ----
else:
os.unlink(fname)
!
def test_listdir(self):
## SUCCESSFUL CASES
***************
*** 39,44 ****
# Check that cache is actually caching, not just passing through.
! 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
--- 39,44 ----
# Check that cache is actually caching, not just passing through.
! 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
***************
*** 49,53 ****
self.assertEquals(entries, ['test1'])
self.assert_(dircache.listdir(self.tempdir) is entries)
!
## UNSUCCESSFUL CASES
self.assertEquals(dircache.listdir(self.tempdir+"_nonexistent"), [])
--- 49,53 ----
self.assertEquals(entries, ['test1'])
self.assert_(dircache.listdir(self.tempdir) is entries)
!
## UNSUCCESSFUL CASES
self.assertEquals(dircache.listdir(self.tempdir+"_nonexistent"), [])
Index: test_os.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_os.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** test_os.py 2001年07月17日 21:56:01 1.2
--- test_os.py 2001年07月21日 01:41:30 1.3
***************
*** 53,57 ****
return
self.check_tempfile(os.tmpnam())
!
--- 53,57 ----
return
self.check_tempfile(os.tmpnam())
!
Index: test_quopri.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_quopri.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** test_quopri.py 2001年06月19日 22:48:42 1.2
--- test_quopri.py 2001年07月21日 01:41:30 1.3
***************
*** 6,10 ****
!
ENCSAMPLE = """\
Here's a bunch of special=20
--- 6,10 ----
!
ENCSAMPLE = """\
Here's a bunch of special=20
***************
*** 26,31 ****
# First line ends with a space
! DECSAMPLE = """\
! Here's a bunch of special
。「」、・ヲァィゥ
--- 26,31 ----
# First line ends with a space
! DECSAMPLE = "Here's a bunch of special \n" + \
! """\
。「」、・ヲァィゥ
***************
*** 44,49 ****
"""
-
class QuopriTestCase(unittest.TestCase):
# Each entry is a tuple of (plaintext, encoded string). These strings are
--- 44,49 ----
"""
+
class QuopriTestCase(unittest.TestCase):
# Each entry is a tuple of (plaintext, encoded string). These strings are
***************
*** 104,116 ****
('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:
--- 104,116 ----
('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:
***************
*** 135,139 ****
self.assert_(encodestring(p, quotetabs=1) == e)
self.assert_(decodestring(e) == p)
-
test_support.run_unittest(QuopriTestCase)
--- 135,139 ----
self.assert_(encodestring(p, quotetabs=1) == e)
self.assert_(decodestring(e) == p)
+
test_support.run_unittest(QuopriTestCase)