Patchwork tests: run test-check-py3-compat only in pure python mode

login
register
mail settings
Submitter Pulkit Goyal
Date Sept. 17, 2020, 10:17 a.m.
Message ID <ffb75b6030ab7a4043ec.1600337845@workspace>
Download mbox | patch
Permalink /patch/47184/
State Accepted
Headers show

Comments

Pulkit Goyal - Sept. 17, 2020, 10:17 a.m.
# HG changeset patch
# User Pulkit Goyal <7895pulkit@gmail.com>
# Date 1600337839 -19800
#      Thu Sep 17 15:47:19 2020 +0530
# Node ID ffb75b6030ab7a4043ecd24c3e9355ec33f4d4fd
# Parent  5f0eeda2005d986d02c702961813170d97f1e399
# EXP-Topic test-fix
tests: run test-check-py3-compat only in pure python mode

This test was added few years ago to detect syntax and import related warnings
and kickstart the python-3 porting efforts. It tries to parse the ast and import
the module.

When using in strict modes like `HGMODULEPOLICY=rust` or `HGMODULEPOLICY=c`, the
test fails. Let's run the test only on pure python mode.

We now have full test suite being run with python 3 and some people even use hg
with python 3 in production (like me).
Yuya Nishihara - Sept. 17, 2020, 11:08 a.m.
On Thu, 17 Sep 2020 15:47:25 +0530, Pulkit Goyal wrote:
> # HG changeset patch
> # User Pulkit Goyal <7895pulkit@gmail.com>
> # Date 1600337839 -19800
> #      Thu Sep 17 15:47:19 2020 +0530
> # Node ID ffb75b6030ab7a4043ecd24c3e9355ec33f4d4fd
> # Parent  5f0eeda2005d986d02c702961813170d97f1e399
> # EXP-Topic test-fix
> tests: run test-check-py3-compat only in pure python mode

Queued, thanks.

Patch

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
@@ -1,4 +1,4 @@ 
-#require test-repo
+#require test-repo pure
 
   $ . "$TESTDIR/helpers-testrepo.sh"
   $ cd "$TESTDIR"/..