def probably_binary(self): p = not identify.is_text(self.open_file) self.open_file.seek(0) return p
def test_is_text(data, expected): assert identify.is_text(io.BytesIO(data)) is expected