# HG changeset patch # User Augie Fackler # Date 1357012235 21600 # Node ID 9916d104c485e744dad50d63398d540f429e0caa # Parent e6c5e009246955f5c7ff042a195923bda46b2430 test-command-template.t: fix test so it all year This test started failing for me after midnight UTC on December 31st. Fixed it by specifying a date 7 years in the future more precisely (rather than just adding 8 to the year and specifying January 1st), which allows the test to pass both now and on 2012-12-01 at the same time. diff -r e6c5e0092469 -r 9916d104c485 tests/test-command-template.t --- a/tests/test-command-template.t Fri Dec 28 16:25:12 2012 -0800 +++ b/tests/test-command-template.t Mon Dec 31 21:50:35 2012 -0600 @@ -1348,7 +1348,8 @@ >>> from datetime import datetime >>> fp = open('a', 'w') - >>> fp.write(str(datetime.now().year + 8) + '-01-01 00:00') + >>> n = datetime.now() + >>> fp.write('%d-%d-%d 00:00' % ((n.year + 7), n.month, n.day)) >>> fp.close() $ hg add a $ hg commit -m future -d "`cat a`"