Patchwork seq.py: use absolute_import, print_function

login
register
mail settings
Submitter roby roby
Date March 25, 2016, 5:04 a.m.
Message ID <CAJYcaSPGWc7r0H+Mn1801KXg-c9uM4vfSKX0XSGT8R49FuzEgQ@mail.gmail.com>
Download mbox | patch
Permalink /patch/14068/
State Changes Requested
Headers show

Comments

roby roby - March 25, 2016, 5:04 a.m.
# HG changeset patch
# User Robert Stanca <robert.stanca7@gmail.com>
# Date 1458882189 -7200
#      Fri Mar 25 07:03:09 2016 +0200
# Node ID 56b803ed2ae4bd2389f7e8e1ba8fc0290bf2531f
# Parent  4d056674733ef697f08301412ce8a07504484184
seq.py: use absolute_import, print_function

Patch

diff -r 4d056674733e -r 56b803ed2ae4 tests/seq.py
--- a/tests/seq.py    Fri Mar 25 06:52:27 2016 +0200
+++ b/tests/seq.py    Fri Mar 25 07:03:09 2016 +0200
@@ -7,6 +7,7 @@ 
 #   seq START STOP        [START, STOP] stepping by 1
 #   seq START STEP STOP   [START, STOP] stepping by STEP

+from __future__ import absolute_import, print_function
 import sys

 start = 1
@@ -20,4 +21,4 @@ 
 stop = int(sys.argv[-1]) + 1

 for i in xrange(start, stop, step):
-    print i
+    print (i)
diff -r 4d056674733e -r 56b803ed2ae4 tests/test-check-py3-compat.t
--- a/tests/test-check-py3-compat.t    Fri Mar 25 06:52:27 2016 +0200
+++ b/tests/test-check-py3-compat.t    Fri Mar 25 07:03:09 2016 +0200
@@ -54,8 +54,6 @@ 
   tests/printenv.py not using absolute_import
   tests/revlog-formatv0.py not using absolute_import
   tests/run-tests.py not using absolute_import
-  tests/seq.py not using absolute_import
-  tests/seq.py requires print_function
   tests/silenttestrunner.py not using absolute_import
   tests/silenttestrunner.py requires print_function
   tests/sitecustomize.py not using absolute_import