def test_open_with_append(self):
    'Opening in append mode is not allowed.'
    with scratch_file('example.gz') as path:
        with open(path, 'w+') as fout:
            pass
        with self.assertRaises(ValueError):
            with gzippy.open(path, 'ab') as fout:
                pass
Opening in append mode is not allowed.
def test_open_with_append(self):
    
    with scratch_file('example.gz') as path:
        with open(path, 'w+') as fout:
            pass
        with self.assertRaises(ValueError):
            with gzippy.open(path, 'ab') as fout:
                pass