--- a/tests/test-command-template.t Tue Aug 22 15:49:20 2017 -0400
+++ b/tests/test-command-template.t Tue Aug 22 15:49:54 2017 -0400
@@ -2166,9 +2166,10 @@
$ cd unstable-hash
$ hg log --template '{date|age}\n' > /dev/null || exit 1
- >>> from datetime import datetime, timedelta
+ >>> from __future__ import absolute_import
+ >>> import datetime
>>> fp = open('a', 'w')
- >>> n = datetime.now() + timedelta(366 * 7)
+ >>> n = datetime.datetime.now() + datetime.timedelta(366 * 7)
>>> fp.write('%d-%d-%d 00:00' % (n.year, n.month, n.day))
>>> fp.close()
$ hg add a