[PATCH] hghave: support HGMODULEPOLICY for pure

timeless timeless at mozdev.org
Mon Jan 11 23:14:36 UTC 2016


# HG changeset patch
# User timeless <timeless at mozdev.org>
# Date 1452554014 0
#      Mon Jan 11 23:13:34 2016 +0000
# Node ID 39122c2442cd445172d7f07adb3f8186f9ddc0f1
# Parent  4571c0b383378f5eec5189e3a39c672a169ce566
hghave: support HGMODULEPOLICY for pure

HGMODULEPOLICY was introduced in 4374d819ccd5

diff --git a/tests/hghave.py b/tests/hghave.py
--- a/tests/hghave.py
+++ b/tests/hghave.py
@@ -460,7 +460,10 @@
 
 @check("pure", "running with pure Python code")
 def has_pure():
-    return os.environ.get("HGTEST_RUN_TESTS_PURE") == "--pure"
+    return any([
+        os.environ.get("HGMODULEPOLICY") == "py",
+        os.environ.get("HGTEST_RUN_TESTS_PURE") == "--pure",
+    ])
 
 @check("slow", "allow slow tests")
 def has_slow():


More information about the Mercurial-devel mailing list