changeset 33950:42361715dd11

tests: update test-command-template to pass our import checker
author Augie Fackler <raf@durin42.com>
date Tue, 22 Aug 2017 15:49:54 -0400
parents 0d0cec9602c3
children 335d45e74381
files tests/test-command-template.t
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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