changeset 27702:39122c2442cd

hghave: support HGMODULEPOLICY for pure HGMODULEPOLICY was introduced in 4374d819ccd5
author timeless <timeless@mozdev.org>
date Mon, 11 Jan 2016 23:13:34 +0000
parents 4571c0b38337
children 4e27c0a70574
files tests/hghave.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/hghave.py	Mon Jan 11 14:27:12 2016 -0600
+++ b/tests/hghave.py	Mon Jan 11 23:13:34 2016 +0000
@@ -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():