Public bug reported:
=================================== FAILURES ===================================
____________________________ T.test_check_files_md5 ____________________________
self = <tests.integration.test_fileutils.T
testMethod=test_check_files_md5>
def test_check_files_md5(self) -> None:
"""check_files_md5()"""
f1 = os.path.join(apport.fileutils.report_dir, "test 1.txt")
f2 = os.path.join(apport.fileutils.report_dir, "test:2.txt")
sumfile = os.path.join(apport.fileutils.report_dir, "sums.txt")
with open(f1, "w", encoding="utf-8") as fd:
fd.write("Some stuff")
with open(f2, "w", encoding="utf-8") as fd:
fd.write("More stuff")
# use one relative and one absolute path in checksums file
with open(sumfile, "w", encoding="utf-8") as fd:
fd.write(f"""\
2e41290da2fa3f68bd3313174467e3b5 {f1[1:]}
f6423dfbc4faf022e58b4d3f5ff71a70 {f2}
""")
self.assertEqual(
apport.fileutils.check_files_md5(sumfile), [], "correct md5sums"
)
with open(f1, "w", encoding="utf-8") as fd:
fd.write("Some stuff!")
> self.assertEqual(
apport.fileutils.check_files_md5(sumfile), [f1[1:]], "file 1
wrong"
)
E AssertionError: Lists differ: ["'tmp/tmpkfop8cc0/test 1.txt'"] !=
['tmp/tmpkfop8cc0/test 1.txt']
E
E First differing element 0:
E "'tmp/tmpkfop8cc0/test 1.txt'"
E 'tmp/tmpkfop8cc0/test 1.txt'
E
E - ["'tmp/tmpkfop8cc0/test 1.txt'"]
E ? - -
E
E + ['tmp/tmpkfop8cc0/test 1.txt'] : file 1 wrong
tests/integration/test_fileutils.py:335: AssertionError
____________________________ T.test_check_files_md5 ____________________________
self = <tests.integration.test_packaging_apt_dpkg.T
testMethod=test_check_files_md5>
def test_check_files_md5(self) -> None:
"""_check_files_md5()."""
td = tempfile.mkdtemp()
try:
f1 = os.path.join(td, "test 1.txt")
f2 = os.path.join(td, "test:2.txt")
with open(f1, "w", encoding="utf-8") as fd:
fd.write("Some stuff")
with open(f2, "w", encoding="utf-8") as fd:
fd.write("More stuff")
# use one relative and one absolute path in checksums file
sumfile = (
b"2e41290da2fa3f68bd3313174467e3b5 " + f1[1:].encode() + b"\n"
b"f6423dfbc4faf022e58b4d3f5ff71a70 " + f2.encode() + b"\n"
b"deadbeef000001111110000011110000 /bin/\xc3\xa4"
)
self.assertEqual(impl._check_files_md5(sumfile), [], "correct
md5sums")
with open(f1, "w", encoding="utf-8") as fd:
fd.write("Some stuff!")
> self.assertEqual(impl._check_files_md5(sumfile), [f1[1:]], "file 1
> wrong")
E AssertionError: Lists differ: ["'tmp/tmpi0vzpcbf/test 1.txt'"] !=
['tmp/tmpi0vzpcbf/test 1.txt']
E
E First differing element 0:
E "'tmp/tmpi0vzpcbf/test 1.txt'"
E 'tmp/tmpi0vzpcbf/test 1.txt'
E
E - ["'tmp/tmpi0vzpcbf/test 1.txt'"]
E ? - -
E
E + ['tmp/tmpi0vzpcbf/test 1.txt'] : file 1 wrong
tests/integration/test_packaging_apt_dpkg.py:60: AssertionError
=============================== warnings summary ===============================
** Affects: apport (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2161957
Title:
test_check_files_md5 fails on stonking
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apport/+bug/2161957/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs