def test_build_hg_cmd(context, hg, args): context.config['hg'] = hg assert mercurial.build_hg_command(context, *args) == [ "hg", "--config", "extensions.robustcheckout={}".format(ROBUSTCHECKOUT_FILE), "blah", "blah", "--baz" ]
def test_build_hg_cmd(config, hg, args): config["hg"] = hg valid_paths = [] # allow for different install types for path in ROBUSTCHECKOUT_FILES: valid_paths.append( [ "hg", "--config", "extensions.robustcheckout={}".format(path), "--config", "extensions.purge=", "--config", "extensions.strip=", "blah", "blah", "--baz", ] ) assert mercurial.build_hg_command(config, *args) in valid_paths
def test_build_hg_cmd(config, hg, args): config["hg"] = hg assert mercurial.build_hg_command( config, *args) == ["hg", "blah", "blah", "--baz"]