def _get_content(self, *args, **kwargs):
    'Use open_compressed and return content using a with-statement.'
    if (kwargs.get('use_extension') is False):
        kwargs['use_extension'] = True
    with tools.open_compressed(*args, **kwargs) as f:
        content = f.read().replace(b'\r\n', b'\n')
    self.assertOneDeprecation(self.INSTEAD)
    return content
Use open_compressed and return content using a with-statement.
def _get_content(self, *args, **kwargs):
    
    if (kwargs.get('use_extension') is False):
        kwargs['use_extension'] = True
    with tools.open_compressed(*args, **kwargs) as f:
        content = f.read().replace(b'\r\n', b'\n')
    self.assertOneDeprecation(self.INSTEAD)
    return content