Loading tests/comparators/test_zip.py +18 −1 Original line number Diff line number Diff line Loading @@ -18,11 +18,12 @@ # along with diffoscope. If not, see <https://www.gnu.org/licenses/>. import pytest import sys from diffoscope.comparators.zip import ZipFile, MozillaZipFile, JmodJavaModule from ..utils.data import load_fixture, assert_diff from ..utils.tools import skip_unless_tools_exist from ..utils.tools import skip_unless_tools_exist, skipif from ..utils.nonexisting import assert_non_existing Loading Loading @@ -84,6 +85,10 @@ def test_mozzip_identification(mozzip1): assert isinstance(mozzip1, MozillaZipFile) @skipif( sys.version_info >= (3, 11, 8), reason="Test fails under 3.11.8+; possible regression" ) def test_mozzip_no_differences(mozzip1): difference = mozzip1.compare(mozzip1) assert difference is None Loading @@ -95,11 +100,19 @@ def mozzip_differences(mozzip1, mozzip2): @skip_unless_tools_exist("zipinfo") @skipif( sys.version_info >= (3, 11, 8), reason="Test fails under 3.11.8+; possible regression" ) def test_mozzip_metadata(mozzip_differences, mozzip1, mozzip2): assert_diff(mozzip_differences[0], "mozzip_zipinfo_expected_diff") @skip_unless_tools_exist("zipinfo") @skipif( sys.version_info >= (3, 11, 8), reason="Test fails under 3.11.8+; possible regression" ) def test_mozzip_compressed_files(mozzip_differences): assert mozzip_differences[-1].source1 == "dir/text" assert mozzip_differences[-1].source2 == "dir/text" Loading @@ -107,6 +120,10 @@ def test_mozzip_compressed_files(mozzip_differences): @skip_unless_tools_exist("zipinfo") @skipif( sys.version_info >= (3, 11, 8), reason="Test fails under 3.11.8+; possible regression" ) def test_mozzip_compare_non_existing(monkeypatch, mozzip1): assert_non_existing(monkeypatch, mozzip1) Loading Loading
tests/comparators/test_zip.py +18 −1 Original line number Diff line number Diff line Loading @@ -18,11 +18,12 @@ # along with diffoscope. If not, see <https://www.gnu.org/licenses/>. import pytest import sys from diffoscope.comparators.zip import ZipFile, MozillaZipFile, JmodJavaModule from ..utils.data import load_fixture, assert_diff from ..utils.tools import skip_unless_tools_exist from ..utils.tools import skip_unless_tools_exist, skipif from ..utils.nonexisting import assert_non_existing Loading Loading @@ -84,6 +85,10 @@ def test_mozzip_identification(mozzip1): assert isinstance(mozzip1, MozillaZipFile) @skipif( sys.version_info >= (3, 11, 8), reason="Test fails under 3.11.8+; possible regression" ) def test_mozzip_no_differences(mozzip1): difference = mozzip1.compare(mozzip1) assert difference is None Loading @@ -95,11 +100,19 @@ def mozzip_differences(mozzip1, mozzip2): @skip_unless_tools_exist("zipinfo") @skipif( sys.version_info >= (3, 11, 8), reason="Test fails under 3.11.8+; possible regression" ) def test_mozzip_metadata(mozzip_differences, mozzip1, mozzip2): assert_diff(mozzip_differences[0], "mozzip_zipinfo_expected_diff") @skip_unless_tools_exist("zipinfo") @skipif( sys.version_info >= (3, 11, 8), reason="Test fails under 3.11.8+; possible regression" ) def test_mozzip_compressed_files(mozzip_differences): assert mozzip_differences[-1].source1 == "dir/text" assert mozzip_differences[-1].source2 == "dir/text" Loading @@ -107,6 +120,10 @@ def test_mozzip_compressed_files(mozzip_differences): @skip_unless_tools_exist("zipinfo") @skipif( sys.version_info >= (3, 11, 8), reason="Test fails under 3.11.8+; possible regression" ) def test_mozzip_compare_non_existing(monkeypatch, mozzip1): assert_non_existing(monkeypatch, mozzip1) Loading