You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
because I'm calling build with --no-isolation I'm using during all processes only locally installed modules
install .whl file in </install/prefix>
run pytest with $PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>
build is performed in env which is cut off from access to the public network (pytest is executed with -m "not network")
Here is pytest output:
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-magic-0.4.27-4.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-magic-0.4.27-4.fc35.x86_64/usr/lib/python3.8/site-packages+ /usr/bin/pytest -ra -m 'not network'==================================================================================== test session starts ====================================================================================platform linux -- Python 3.8.16, pytest-7.2.2, pluggy-1.0.0rootdir: /home/tkloczko/rpmbuild/BUILD/python-magic-0.4.27collected 20 itemstest/libmagic_test.py ... [ 15%]test/python_magic_test.py ..F...........ss. [100%]========================================================================================= FAILURES ==========================================================================================_________________________________________________________________________________ MagicTest.test_extension __________________________________________________________________________________self = <test.python_magic_test.MagicTest testMethod=test_extension> def test_extension(self): try: m = magic.Magic(extension=True)
> self.assert_values(m, { # some versions return '' for the extensions of a gz file, # including w/ the command line. Who knows... 'test.gz': ('gz/tgz/tpz/zabw/svgz', '', '???'), 'name_use.jpg': 'jpeg/jpg/jpe/jfif', })test/python_magic_test.py:134:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _test/python_magic_test.py:53: in assert_values self.assertIn(value, expected_value)E AssertionError: 'gz/tgz/tpz/zabw/svgz/adz/kmy/xcfgz' not found in ('gz/tgz/tpz/zabw/svgz', '', '???')===================================================================================== warnings summary ======================================================================================test/libmagic_test.py::MagicTestCase::test_detect_from_contenttest/libmagic_test.py::MagicTestCase::test_detect_from_filenametest/libmagic_test.py::MagicTestCase::test_detect_from_fobj /home/tkloczko/rpmbuild/BUILD/python-magic-0.4.27/magic/__init__.py:437: PendingDeprecationWarning: Using compatibility mode with libmagic's python binding. See https://github.com/ahupp/python-magic/blob/master/COMPAT.md for details. warnings.warn(-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html================================================================================== short test summary info ==================================================================================SKIPPED [1] test/python_magic_test.py:143: Magic file doesn't return expected type.SKIPPED [1] test/python_magic_test.py:153: Magic file doesn't return expected type.FAILED test/python_magic_test.py::MagicTest::test_extension - AssertionError: 'gz/tgz/tpz/zabw/svgz/adz/kmy/xcfgz' not found in ('gz/tgz/tpz/zabw/svgz', '', '???')==================================================================== 1 failed, 17 passed, 2 skipped, 3 warnings in 0.14s ====================================================================
This is fixed in a test update in 4ffcd59. I usually only roll a new release for feature updates, but I could put out a 0.4.28 with this if it's helpful
I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
build
with--no-isolation
I'm using during all processes only locally installed modulescut off from access to the public network
(pytest is executed with-m "not network"
)Here is pytest output:
Here is list of installed modules in build env
The text was updated successfully, but these errors were encountered: