04808b85421bb7e68611bc4b5b4ae487bdf49dfd,reframe/core/environments.py,Environment,emit_unload_commands,#Environment#,128

Before Change


            itertools.chain(*(rt.modules_system.emit_unload_commands(m)
                              for m in reversed(self._modules)))
        )
        ret += list(
            itertools.chain(*(rt.modules_system.emit_load_commands(m)
                              for m in self._conflicted))
        )
        return ret

    def __eq__(self, other):
        if not isinstance(other, type(self)):

After Change



        // Invert the logic of module operations, since we are unloading the
        // environment
        emit_fn = {
            "l": rt.modules_system.emit_unload_commands,
            "u": rt.modules_system.emit_load_commands
        }

        ret = []
        for var in self._variables.keys():
            ret.append("unset %s" % var)

        if self._module_ops:
            module_ops = reversed(self._module_ops)
        else:
            module_ops = (("l", m) for m in reversed(self._modules))

        for op, m in module_ops:
            ret += emit_fn[op](m)

        return ret

    def __eq__(self, other):
        if not isinstance(other, type(self)):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: eth-cscs/reframe
Commit Name: 04808b85421bb7e68611bc4b5b4ae487bdf49dfd
Time: 2018-12-17
Author: karakasis@cscs.ch
File Name: reframe/core/environments.py
Class Name: Environment
Method Name: emit_unload_commands


Project Name: eth-cscs/reframe
Commit Name: 04808b85421bb7e68611bc4b5b4ae487bdf49dfd
Time: 2018-12-17
Author: karakasis@cscs.ch
File Name: reframe/core/environments.py
Class Name: Environment
Method Name: emit_load_commands


Project Name: pantsbuild/pants
Commit Name: a22ef1dc318ed6043465fd895cace66e85b0a983
Time: 2017-04-17
Author: benjyw@gmail.com
File Name: src/python/pants/backend/python/tasks2/pytest_run.py
Class Name: PytestRun
Method Name: _do_run_tests