hghave: support HGMODULEPOLICY for pure
HGMODULEPOLICY was introduced in
4374d819ccd5
--- 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():