tests/test-command-template.t
branchstable
changeset 18207 3b1005354440
parent 18199 24f5bec1601f
child 18715 c4ff927b6f68
--- a/tests/test-command-template.t	Wed Jan 02 00:07:43 2013 -0600
+++ b/tests/test-command-template.t	Wed Jan 02 13:59:07 2013 +0100
@@ -1346,10 +1346,10 @@
 
   $ hg log --template '{date|age}\n' > /dev/null || exit 1
 
-  >>> from datetime import datetime
+  >>> from datetime import datetime, timedelta
   >>> fp = open('a', 'w')
-  >>> n = datetime.now()
-  >>> fp.write('%d-%d-%d 00:00' % ((n.year + 7), n.month, n.day))
+  >>> n = datetime.now() + timedelta(366 * 7)
+  >>> fp.write('%d-%d-%d 00:00' % (n.year, n.month, n.day))
   >>> fp.close()
   $ hg add a
   $ hg commit -m future -d "`cat a`"