Patchwork [1,of,7,v2] hghave: support HGMODULEPOLICY for pure

login
register
mail settings
Submitter timeless@mozdev.org
Date Jan. 12, 2016, 5:23 a.m.
Message ID <39122c2442cd445172d7.1452576183@waste.org>
Download mbox | patch
Permalink /patch/12671/
State Accepted
Commit 39122c2442cd445172d7f07adb3f8186f9ddc0f1
Headers show

Comments

timeless@mozdev.org - Jan. 12, 2016, 5:23 a.m.
# HG changeset patch
# User timeless <timeless@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

Patch

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():