diff options
author | Adam Hupp <adam@hupp.org> | 2018-09-01 16:34:13 -0700 |
---|---|---|
committer | Adam Hupp <adam@hupp.org> | 2018-09-01 16:34:13 -0700 |
commit | 33528682227836c6375c848bee8c767e42641fd8 (patch) | |
tree | 6c9897e68c8880b92e8e6848083d3128809d75ff /test/test.py | |
parent | 79eed130562212190140f6192b296d1142cb762f (diff) | |
download | python-magic-fix-ci.tar.gz |
Use INDIR_MAX rather than BYTES_MAX in tests since the latter wasn'tfix-ci
supported until recently. Also, return .value from the ctypes wrapper
so callers aren't required to.
Diffstat (limited to 'test/test.py')
-rwxr-xr-x | test/test.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/test/test.py b/test/test.py index 54ffe32..ab29def 100755 --- a/test/test.py +++ b/test/test.py @@ -125,13 +125,9 @@ class MagicTest(unittest.TestCase): magic.magic_buffer = old def test_getparam(self): - filename = os.path.join(self.TESTDATA_DIR, 'keep-going.jpg') - m = magic.Magic(mime=True) - self.assertEqual(m.getparam(magic.MAGIC_PARAM_BYTES_MAX).value, 1048576) - m.setparam(magic.MAGIC_PARAM_BYTES_MAX, 1) - self.assertEqual(m.getparam(magic.MAGIC_PARAM_BYTES_MAX).value, 1) - self.assertEqual(m.from_file(filename), 'application/octet-stream') + m.setparam(magic.MAGIC_PARAM_INDIR_MAX, 1) + self.assertEqual(m.getparam(magic.MAGIC_PARAM_INDIR_MAX), 1) if __name__ == '__main__': unittest.main() |