diff tests/hghave.py @ 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 e1f55b50edcb
children 562a073a2a1b
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():