- The pattern of "get temporary filename, do stuff, check stuff, remove temporary file" occurs elsewhere so it's been bundled into a helper method: `self.temp_filename()`. Using this gives:

```
with self.temp_filename() as filename:
    with open(filename, 'w') as f:
        iris.util....
        f.close()
    self.assert....
```
- `os.remove()` won't get called if the assertion fails. Sadly I've just noticed this is true for `self.temp_filename()` too! But it can be fixed with a `try...finally` block:

```
    @contextlib.contextmanager
    def temp_filename(self, suffix=''):
        filename = iris.util.create_temp_filename(suffix)
        try:
            yield filename
        finally:
            os.remove(filename)
```