diff options
| author | Adam Hupp <adam@hupp.org> | 2019-12-11 22:13:58 -0800 |
|---|---|---|
| committer | Adam Hupp <adam@hupp.org> | 2019-12-11 22:13:58 -0800 |
| commit | 8852eafff7c8d0b386a6b648fff5b51602014f2b (patch) | |
| tree | d721873f6aa6532eba5cf49f3f085ac5e40cf66a /test | |
| parent | cc346b83b55d97eb473599e0f2b5fd355a11b35f (diff) | |
| download | python-magic-8852eafff7c8d0b386a6b648fff5b51602014f2b.tar.gz | |
Fix https://github.com/ahupp/python-magic/issues/190
Diffstat (limited to 'test')
| -rwxr-xr-x | test/run.sh | 2 | ||||
| -rwxr-xr-x | test/test.py | 5 | ||||
| -rw-r--r-- | test/testdata/python-3.7.2-python-magic-0.4.15.jpg | bin | 0 -> 1722401 bytes |
3 files changed, 6 insertions, 1 deletions
diff --git a/test/run.sh b/test/run.sh index 63698ab..ebd7976 100755 --- a/test/run.sh +++ b/test/run.sh @@ -7,7 +7,7 @@ export LC_ALL=en_US.UTF-8 THISDIR=`dirname $0` export PYTHONPATH=${THISDIR}/.. -PYTHONS="python2.7 python3.5" +PYTHONS="python2.7 python3.5 python3.7" for pyver in $PYTHONS; do if which $pyver > /dev/null; then diff --git a/test/test.py b/test/test.py index 0f3aac2..3d835c1 100755 --- a/test/test.py +++ b/test/test.py @@ -148,5 +148,10 @@ class MagicTest(unittest.TestCase): m.setparam(magic.MAGIC_PARAM_INDIR_MAX, 1) self.assertEqual(m.getparam(magic.MAGIC_PARAM_INDIR_MAX), 1) + def test_name_count(self): + m = magic.Magic() + with open('testdata/python-3.7.2-python-magic-0.4.15.jpg', 'rb') as f: + m.from_buffer(f.read()) + if __name__ == '__main__': unittest.main() diff --git a/test/testdata/python-3.7.2-python-magic-0.4.15.jpg b/test/testdata/python-3.7.2-python-magic-0.4.15.jpg Binary files differnew file mode 100644 index 0000000..e2dc2d7 --- /dev/null +++ b/test/testdata/python-3.7.2-python-magic-0.4.15.jpg |
