def prepend_directory_to_variable(self, directory, variable):
        # ":" on unix, ";" on windows
        pathsep = os.path.pathsep

        # always sanitize inputs:
        # on windows, upper-case the env var (just in case)
        if sys.platform.startswith("win"):
            variable = variable.upper()
        directory = qisys.sh.to_native_path(directory)

        old_value = self._build_env.get(variable, "")
        # avoid having empty paths:
        if old_value.endswith(pathsep):
            old_value = old_value[:-1]
        splitted_paths = old_value.split(pathsep)
        if directory in splitted_paths:
            splitted_paths.remove(directory)

        splitted_paths.insert(0, directory)

        self._build_env[variable] = pathsep.join(splitted_paths)
Ensure that the instance attribute correctly returns
dataset/ETHPy150Open aldebaran/qibuild/python/qisys/envsetter.py/EnvSetter.prepend_directory_to_variable--crossover with--dataset/ETHPy150Open ofa/connect/connect_extras/tests/test_bsdtoolsauth.py/TestBSDToolsOAuthBackend.test_instance_url