def METHOD_NAME(prepare_environment_for_tests, shell_as, shell, tmpdir):
    test_paths = "/a:/b/x:/b/c"
    os.environ["TEST_ENV_VAR"] = test_paths
    dumpfile_path = str(tmpdir.join("envdump.txt"))
    envutil.dump_environment(dumpfile_path)
    with open(dumpfile_path, "r") as dumpfile:
        if shell == "pwsh":
            assert "$Env:TEST_ENV_VAR={}\n".format(test_paths) in list(dumpfile)
        elif shell == "bat":
            assert 'set "TEST_ENV_VAR={}"\n'.format(test_paths) in list(dumpfile)
        else:
            assert "TEST_ENV_VAR={0}; export TEST_ENV_VAR\n".format(test_paths) in list(dumpfile)