# HG changeset patch # User Pierre-Yves David # Date 1583450889 -3600 # Node ID dca4b5da417d8d8afac527ebc588e5c9fff4befa # Parent b24721e7c5ee90c31d12462109c75b0389a9df84 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 diff -r b24721e7c5ee -r dca4b5da417d tests/test-remotefilelog-datapack.py --- 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,