Fix unit tests when hg is uninstalled or matches a different Python.
Review Request #10621 — Created July 8, 2019 and submitted — Latest diff uploaded
We had a unit test that was checking for the
mercurial
module to be
loaded before attempting to create a Mercurial-based repository. This
check wasn't correct, because we don't care if the module is accessible.
We only care if thehg
binary is.Another unit test wasn't performing a check at all, erroring out instead
when trying to create the repository.This change fixes both issues by checking for the
hg
binary to be
available before running the test.
Unit tests pass with and without the
hg
binary (and without access to
themercurial
module).