(self)
| 37 | self.assert_result(result) |
| 38 | |
| 39 | def test_detect_from_content(self): |
| 40 | # differ from upstream by opening file in binary mode, |
| 41 | # this avoids hitting a bug in python3+libfile bindings |
| 42 | # see https://github.com/ahupp/python-magic/issues/152 |
| 43 | # for a similar issue |
| 44 | with open(self.filename, 'rb') as fobj: |
| 45 | result = magic.detect_from_content(fobj.read(4096)) |
| 46 | self.assert_result(result) |
| 47 | |
| 48 | |
| 49 | if __name__ == '__main__': |
nothing calls this directly
no test coverage detected