summaryrefslogtreecommitdiff
path: root/test/test.py
Commit message (Collapse)AuthorAgeFilesLines
* rename test to match standard naming rules, so pytest finds it: ↵Adam Hupp2022-04-251-232/+0
| | | | https://docs.pytest.org/en/6.2.x/goodpractices.html#test-discovery
* less surprising use of abspathAdam Hupp2022-04-251-1/+1
|
* Support file 5.41.Martin Liska2021-10-221-1/+1
| | | | | In https://github.com/file/file/commit/7d9b0f0d853957ad88dae0f440fecd58d2740ca7, the MIME was changed for Python bytecode.
* Support os.PathLike typesAdam Hupp2021-10-041-0/+8
| | | | See https://github.com/ahupp/python-magic/pull/251
* Update tests and docker config for newer versionsAdam Hupp2021-06-011-1/+2
|
* remove from_open_file, since its duplicative with from_descriptor and hasnt ↵Adam Hupp2021-01-151-9/+0
| | | | been released yet
* skip magic_descriptor tests in centos 7Adam Hupp2021-01-151-0/+10
|
* Reformat according to PEPSchoolGuy2021-01-131-17/+21
| | | | I achieved this via the PyCharm Reformat Shortcut
* add from_open_file to match libmagic binding featuresetAdam Hupp2017-12-041-0/+6
|
* Added support for magic_descriptor routinepsrok12020-12-071-0/+7
|
* Handle libmagic versions that don't support MAGIC_EXTENSIONAdam Hupp2020-11-061-5/+10
| | | | | | | | | | extension support was added to libmagic in 2015 in 9190a18d09f25fb0ca6abe1fcbdba780f5077e45. This change: - updates the test to handle various verions that return garbage / empty string.s - throws an exception in magic.Magic if extension support is requested and we know its not supported.
* MAGIC_EXTENSION support (file --extension)darkbarker2020-10-221-0/+7
|
* support changed mime types in testAdam Hupp2020-09-151-4/+8
|
* Fix tests with file 5.39Luca Weiss2020-09-071-4/+6
|
* Make magic_[version|setparam|getparam] optionalAdam Hupp2020-05-051-6/+18
| | | | | These aren't present in ancient versions of libmagic, so only fetch optionally and throw NotImplementedError if called.
* Update for deprecation of testing in setup.pyAdam Hupp2020-05-051-0/+6
| | | | | test_suite is deprecated in setup.py, so remove it and replace the command in .travis.yml with directly running the test
* Add alternative output for Parquet fileAdam Hupp2020-03-311-2/+2
|
* Adding snappy parquet to testKyle Prifogle2020-03-301-0/+2
|
* Expose magic_version as magic.version(), which returns an integer ↵Adam Hupp2020-01-241-0/+3
| | | | | | representing the version number. re: https://github.com/ahupp/python-magic/issues/204
* Add dockerfiles for running tests on various Ubuntu LTS versionsAdam Hupp2020-01-111-1/+4
|
* Hopefully fix #105Adam Hupp2020-01-111-1/+5
|
* actually fix CIAdam Hupp2019-12-111-1/+1
|
* Fix https://github.com/ahupp/python-magic/issues/190Adam Hupp2019-12-111-0/+5
|
* Updated constructor to accept the raw flag and pass it to the underlying ↵rmspeers2018-09-201-0/+19
| | | | library. Helpful for cases where unicode chars exist in match results.
* Use INDIR_MAX rather than BYTES_MAX in tests since the latter wasn'tfix-ciAdam Hupp2018-09-011-6/+2
| | | | | supported until recently. Also, return .value from the ctypes wrapper so callers aren't required to.
* getparam/setparam support #163Christoph Biedl2018-08-161-0/+8
|
* Apply change from Corin-EU to allow tests to be run from any directoryAdam Hupp2018-08-161-3/+5
|
* Merge pull request #177 from sbraz/bufferAdam Hupp2018-08-151-11/+14
|\ | | | | Tests: allow differences when reading a buffer or a file, fixes #173
| * Tests: allow differences when reading a buffer or a file, fixes #173Louis Sautier2018-08-141-11/+14
| | | | | | | | | | Also remove the loop in order to avoid analyzing files or buffers for each expected value, replace it with a call to assertIn().
* | Allow x-gzip as MIME type for gzip files, fixes #96Louis Sautier2018-08-131-1/+1
|/
* Bring "from_file()" under testGuido A.J. Stevens2018-01-251-0/+6
|
* PEP8Guido A.J. Stevens2018-01-251-11/+18
|
* fix test for xenial since travis started enabling itAdam Hupp2017-12-091-5/+5
|
* Merge pull request #149 from hugovk/fix-ciAdam Hupp2017-11-201-1/+1
|\ | | | | Fix the CI
| * Revert "update filetype reported by libmagic >=5.23 for keep_going=true"Hugo2017-10-141-1/+1
| | | | | | | | This reverts commit 9d127ceaab1da0632128422ffd6a2d340bd3e778.
* | python3 str handlingAdam Hupp2017-11-201-0/+7
|/ | | | | | | In python3 ctypes, a str is passed to ctypes as wchar*. This means the layout of the string magic looks like [ascii, null, ascii, null, etc]. For some reason, magic handles this just fine most of the time, but it's clearly wrong and I'm amazed it worked at all.
* update filetype reported by libmagic >=5.23 for keep_going=trueAdam Hupp2017-10-011-1/+1
|
* rename magic.pyc to avoid cleaning during build stepAdam Hupp2017-09-141-2/+2
|
* Return str rather than bytes for the description strings on python3.Adam Hupp2016-06-051-6/+3
| | | | | Assumes utf-8 encoding from magic return values, which I hope is always the case.
* propagate exception in other branch of 509 hackAdam Hupp2016-06-051-0/+11
|
* hopefully fix tests on whatever travisci usesAdam Hupp2016-03-211-9/+18
|
* rename the unicode lambda file to "lambda" and rename it at runtime when ↵Adam Hupp2016-03-201-10/+15
| | | | | | running the test. distutils can't handle unicode filenames at install time.
* Fix travis configRaphaël Vinot2015-11-061-0/+0
| | | | The tests fail on travis ci because the libmagic 5.09 is buggy.
* force GMT so test runs consistentlytz-testfixAdam Hupp2015-11-061-2/+6
|
* update test output for libmagic in debian jessieAdam Hupp2015-10-191-4/+4
|
* Include tests in the sdist tarballAdam Hupp2015-07-291-0/+78