Mercurial > hg
diff tests/test-remotefilelog-datapack.py @ 44432:dca4b5da417d stable
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
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 06 Mar 2020 00:28:09 +0100 |
parents | 37458d8b0c1e |
children | c102b704edb5 |
line wrap: on
line diff
--- 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,