Explorar el Código

Fix pack copy test for Windows Python 3.14

Jelmer Vernooij hace 3 meses
padre
commit
ff12897285
Se han modificado 1 ficheros con 7 adiciones y 4 borrados
  1. 7 4
      tests/test_pack.py

+ 7 - 4
tests/test_pack.py

@@ -520,10 +520,13 @@ class TestPack(PackTests):
                 self.assertEqual(origpack, newpack)
                 self.assertSucceeds(newpack.index.check)
                 self.assertEqual(origpack.name(), newpack.name())
-                self.assertEqual(
-                    origpack.index.get_pack_checksum(),
-                    newpack.index.get_pack_checksum(),
-                )
+                # Note: We don't compare pack data checksums here because Git does
+                # not require deterministic object ordering in pack files. The same
+                # set of objects can be written in different orders (e.g., due to
+                # dict iteration order differences across Python versions/platforms),
+                # producing different but equally valid pack files with different
+                # checksums. The assertEqual above already verifies both packs
+                # contain the same objects by comparing their indices.
 
                 wrong_version = origpack.index.version != newpack.index.version
                 orig_checksum = origpack.index.get_stored_checksum()