예제 #1
0
파일: models.py 프로젝트: gnowxilef/fluffy
 def probably_binary(self):
     p = not identify.is_text(self.open_file)
     self.open_file.seek(0)
     return p
예제 #2
0
def test_is_text(data, expected):
    assert identify.is_text(io.BytesIO(data)) is expected
예제 #3
0
파일: models.py 프로젝트: dst1213/fluffy
 def probably_binary(self):
     p = not identify.is_text(self.open_file)
     self.open_file.seek(0)
     return p