def test_iadd(self, evt):
        rval = event.ReturnValue(append_events=[evt])
        rval2 = event.ReturnValue(eat=True, append_events=[evt])
        rset = event.ResultSet()

        rset += rval
        rset += rval2
        rset += None
        assert rset.eat
        assert rset.append_events == [evt, evt]
def setup_run_environment(self, env):
        bashrc = self.prefix.etc.bashrc
        try:
            env.extend(EnvironmentModifications.from_sourcing_file(
                bashrc, clean=True
            ))
        except Exception as e:
            msg = 'unexpected error when sourcing OpenFOAM bashrc [{0}]'
            tty.warn(msg.format(str(e)))