Skip to content
Snippets Groups Projects
Commit 5e6cfbf0 authored by Chris Lamb's avatar Chris Lamb :eyes:
Browse files

Temporarily fix support for Python 3.11.8. See #362.

parent 18d69030
No related branches found
No related tags found
No related merge requests found
......@@ -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
......@@ -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
......@@ -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"
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment