Skip to content

tests/comparators/test_python.py::test_diff fails on s390x

I suspect this might easily be a BE/LE issue since it's failing only on s390x, but haven't looked at this at all.

Seen on ubuntu's autopkgtest (https://autopkgtest.ubuntu.com/results/autopkgtest-jammy/jammy/s390x/d/diffoscope/20211130_124107_298ac@/log.gz)

=================================== FAILURES ===================================
__________________________________ test_diff ___________________________________

differences = [<Difference Python bytecode -- Python bytecode []>]

    @skip_unless_file_version_is_at_least("5.39")
    @skipif(
        sys.version_info < (3, 8),
        reason="Python 3.7 cannot de-marshal test1.pyc-renamed",
    )
    def test_diff(differences):
>       assert_diff_startswith(
            differences[0],
            "pyc_expected_diff",
        )

differences = [<Difference Python bytecode -- Python bytecode []>]

tests/comparators/test_python.py:59: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

difference = <Difference Python bytecode -- Python bytecode []>
filename = 'pyc_expected_diff'

    def assert_diff_startswith(difference, filename):
        haystack = difference.unified_diff
        needle = get_data(filename)
>       assert haystack.startswith(needle)
E       AssertionError

difference = <Difference Python bytecode -- Python bytecode []>
filename   = 'pyc_expected_diff'
haystack   = ('@@ -1,9 +1,9 @@\n'
 ' magic:    0x610d0d0a\n'
 '-moddate:  0xbd103561 (Mon Jul  7 10:54:25 2070 UTC)\n'
 '+moddate:  0xae814d61 (Tue Oct 10 12:38:57 2062 UTC)\n'
 ' files sz: 2302083072\n'
 ' code\n'
 '    argcount  : 0\n'
 '    nlocals   : 0\n'
 '    stacksize : 3\n'
 '    flags     : 64\n'
 '    code\n')
needle     = ('@@ -1,9 +1,9 @@\n'
 ' magic:    0x610d0d0a\n'
 '-moddate:  0xbd103561 (Sun Sep  5 18:47:25 2021 UTC)\n'
 '+moddate:  0xae814d61 (Fri Sep 24 07:43:42 2021 UTC)\n'
 ' files sz: 14217\n'
 ' code\n'
 '    argcount  : 0\n'
 '    nlocals   : 0\n'
 '    stacksize : 3\n'
 '    flags     : 64\n'
 '    code\n')

tests/utils/data.py:70: AssertionError
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information