Comment 4 for bug 235267

Revision history for this message
Jonathan Lange (jml) wrote :

I'd rather see case 2 handled using addCleanup:

    config.push('test data', test_data)
    self.addCleanup(config.pop, 'test_data')

In fact, we could even add a helper method to do this:

    def pushConfig(self, name, value):
        config.push(name, value)
        self.addCleanup(config.pop, name)