tests: update test-command-template to pass our import checker
authorAugie Fackler <raf@durin42.com>
Tue, 22 Aug 2017 15:49:54 -0400
changeset 33950 42361715dd11
parent 33949 0d0cec9602c3
child 33951 335d45e74381
tests: update test-command-template to pass our import checker
tests/test-command-template.t
--- 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