def setupEnvironment(self, cmd): Trial.setupEnvironment(self, cmd) # get the appropriate database configuration from the slave extra_env = self.buildslave.databases[self.db] cmd.args['env'].update(extra_env)