Patchwork [1,of,3] test-check-py3-compat: don't run py2 part if $PYTHON is python3

login
register
mail settings
Submitter Yuya Nishihara
Date Sept. 2, 2018, 7:43 a.m.
Message ID <608d6534e5fcd1d1ec32.1535874235@mimosa>
Download mbox | patch
Permalink /patch/34252/
State Accepted
Headers show

Comments

Yuya Nishihara - Sept. 2, 2018, 7:43 a.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1535873014 -32400
#      Sun Sep 02 16:23:34 2018 +0900
# Node ID 608d6534e5fcd1d1ec32119b4f8614ce91f96871
# Parent  fabfd409466f6320b99a38a1c3e9ca5fe6f22a6d
test-check-py3-compat: don't run py2 part if $PYTHON is python3
Pulkit Goyal - Sept. 3, 2018, 10:34 a.m.
On Sun, Sep 2, 2018 at 10:45 AM Yuya Nishihara <yuya@tcha.org> wrote:

> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1535873014 -32400
> #      Sun Sep 02 16:23:34 2018 +0900
> # Node ID 608d6534e5fcd1d1ec32119b4f8614ce91f96871
> # Parent  fabfd409466f6320b99a38a1c3e9ca5fe6f22a6d
> test-check-py3-compat: don't run py2 part if $PYTHON is python3
>

Queued this series, many many thanks!

Patch

diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist
--- a/contrib/python3-whitelist
+++ b/contrib/python3-whitelist
@@ -56,6 +56,7 @@  test-check-commit.t
 test-check-execute.t
 test-check-interfaces.py
 test-check-module-imports.t
+test-check-py3-compat.t
 test-check-pyflakes.t
 test-check-pylint.t
 test-check-shbang.t
diff --git a/tests/test-check-py3-compat.t b/tests/test-check-py3-compat.t
--- a/tests/test-check-py3-compat.t
+++ b/tests/test-check-py3-compat.t
@@ -3,6 +3,7 @@ 
   $ . "$TESTDIR/helpers-testrepo.sh"
   $ cd "$TESTDIR"/..
 
+#if no-py3k
   $ testrepohg files 'set:(**.py)' \
   > -X hgdemandimport/demandimportpy2.py \
   > -X mercurial/thirdparty/cbor \
@@ -21,6 +22,7 @@ 
   contrib/python-zstandard/tests/test_module_attributes.py not using absolute_import
   contrib/python-zstandard/tests/test_train_dictionary.py not using absolute_import
   setup.py not using absolute_import
+#endif
 
 #if py3exe
   $ testrepohg files 'set:(**.py) - grep(pygments)' \