Shouldn't this be `cls.context.close()`?

And shouldn't this be called after the `del`s?