[Python-checkins] r85941 - in python/branches/release31-maint/Lib/test: test_genericpath.py test_posixpath.py

antoine.pitrou python-checkins at python.org
Fri Oct 29 23:52:24 CEST 2010


Author: antoine.pitrou
Date: Fri Oct 29 23:52:23 2010
New Revision: 85941
Log:
Use assertLessEqual to ease diagnosing of failures
Modified:
 python/branches/release31-maint/Lib/test/test_genericpath.py
 python/branches/release31-maint/Lib/test/test_posixpath.py
Modified: python/branches/release31-maint/Lib/test/test_genericpath.py
==============================================================================
--- python/branches/release31-maint/Lib/test/test_genericpath.py	(original)
+++ python/branches/release31-maint/Lib/test/test_genericpath.py	Fri Oct 29 23:52:23 2010
@@ -50,8 +50,8 @@
 f.close()
 self.assertEqual(d, b"foobar")
 
- self.assertTrue(
- genericpath.getctime(support.TESTFN) <=
+ self.assertLessEqual(
+ genericpath.getctime(support.TESTFN),
 genericpath.getmtime(support.TESTFN)
 )
 finally:
Modified: python/branches/release31-maint/Lib/test/test_posixpath.py
==============================================================================
--- python/branches/release31-maint/Lib/test/test_posixpath.py	(original)
+++ python/branches/release31-maint/Lib/test/test_posixpath.py	Fri Oct 29 23:52:23 2010
@@ -229,8 +229,8 @@
 f.close()
 self.assertEqual(d, b"foobar")
 
- self.assertTrue(
- posixpath.getctime(support.TESTFN) <=
+ self.assertLessEqual(
+ posixpath.getctime(support.TESTFN),
 posixpath.getmtime(support.TESTFN)
 )
 finally:


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /