[Checkins] SVN: Products.GenericSetup/trunk/ Avoid using DateTime values for file system time stamps in tests.
Hanno Schlichting
hannosch at hannosch.eu
Fri May 6 14:36:21 EDT 2011
Log message for revision 121569:
Avoid using DateTime values for file system time stamps in tests.
Changed:
U Products.GenericSetup/trunk/Products/GenericSetup/tests/test_context.py
U Products.GenericSetup/trunk/docs/CHANGES.rst
-=-
Modified: Products.GenericSetup/trunk/Products/GenericSetup/tests/test_context.py
===================================================================
--- Products.GenericSetup/trunk/Products/GenericSetup/tests/test_context.py 2011-05-06 18:28:32 UTC (rev 121568)
+++ Products.GenericSetup/trunk/Products/GenericSetup/tests/test_context.py 2011-05-06 18:36:21 UTC (rev 121569)
@@ -136,7 +136,7 @@
lm = ctx.getLastModified( FILENAME )
self.failUnless( isinstance( lm, DateTime ) )
- self.assertEqual( lm, timestamp )
+ self.assertEqual( lm.timeTime(), timestamp )
def test_getLastModified_subdir( self ):
@@ -152,7 +152,7 @@
lm = ctx.getLastModified( FILENAME )
self.failUnless( isinstance( lm, DateTime ) )
- self.assertEqual( lm, timestamp )
+ self.assertEqual( lm.timeTime(), timestamp )
def test_getLastModified_directory( self ):
@@ -169,7 +169,7 @@
lm = ctx.getLastModified( SUBDIR )
self.failUnless( isinstance( lm, DateTime ) )
- self.assertEqual( lm, timestamp )
+ self.assertEqual( lm.timeTime(), timestamp )
def test_isDirectory_nonesuch( self ):
@@ -567,7 +567,7 @@
from string import printable
FILENAME = 'simple.txt'
- WHEN = DateTime( '2004-01-01T00:00:00Z' )
+ WHEN = DateTime( '2004-01-01T00:00:00Z' ).timeTime()
site, tool, ctx = self._makeOne( { FILENAME : printable }
, mod_time=WHEN )
@@ -581,7 +581,7 @@
FILENAME = 'subdir.txt'
SUBDIR = 'subdir'
PATH = '%s/%s' % ( SUBDIR, FILENAME )
- WHEN = DateTime( '2004-01-01T00:00:00Z' )
+ WHEN = DateTime( '2004-01-01T00:00:00Z' ).timeTime()
site, tool, ctx = self._makeOne( { PATH: printable }
, mod_time=WHEN )
@@ -595,7 +595,7 @@
FILENAME = 'subdir.txt'
SUBDIR = 'subdir'
PATH = '%s/%s' % ( SUBDIR, FILENAME )
- WHEN = DateTime( '2004-01-01T00:00:00Z' )
+ WHEN = DateTime( '2004-01-01T00:00:00Z' ).timeTime()
site, tool, ctx = self._makeOne( { PATH: printable }
, mod_time=WHEN
Modified: Products.GenericSetup/trunk/docs/CHANGES.rst
===================================================================
--- Products.GenericSetup/trunk/docs/CHANGES.rst 2011-05-06 18:28:32 UTC (rev 121568)
+++ Products.GenericSetup/trunk/docs/CHANGES.rst 2011-05-06 18:36:21 UTC (rev 121569)
@@ -4,6 +4,8 @@
1.6.4 (unreleased)
------------------
+- Avoid using DateTime values for file system time stamps in tests.
+
- If profiles get imported multiple times within a second, generate new
ids for each profile. This removes spurious failures in fast tests
of packages that use GenericSetup.
@@ -36,6 +38,7 @@
- Toolset import: Support replacement of subclassed tools.
+
1.6.2 (2010-08-12)
------------------
More information about the checkins
mailing list