test: cleanly skip test-remotefilelog-datapack.py on policy that breaks it
That tests requires the pure module to be available.
Differential Revision: https://phab.mercurial-scm.org/D8245
--- a/tests/test-remotefilelog-datapack.py Thu Mar 05 09:26:45 2020 +0100
+++ b/tests/test-remotefilelog-datapack.py Fri Mar 06 00:28:09 2020 +0100
@@ -17,6 +17,14 @@
# Load the local remotefilelog, not the system one
sys.path[0:0] = [os.path.join(os.path.dirname(__file__), '..')]
from mercurial.node import nullid
+from mercurial import policy
+
+if not policy._packageprefs.get(policy.policy, (False, False))[1]:
+ if __name__ == '__main__':
+ msg = "skipped: pure module not available with module policy:"
+ print(msg, policy.policy, file=sys.stderr)
+ sys.exit(80)
+
from mercurial import (
pycompat,
ui as uimod,