[PATCH 03 of 10] tests: update test-remotefilelog-gc.t for Python 3.11

Mads Kiilerich mads at kiilerich.com
Wed Jun 28 00:06:48 UTC 2023


# HG changeset patch
# User Mads Kiilerich <mads at kiilerich.com>
# Date 1679497559 -3600
#      Wed Mar 22 16:05:59 2023 +0100
# Branch stable
# Node ID deb45f7a7f7bdc36c36f7bfb63c36701b44972ab
# Parent  141a32ae6e30dc9bdf0e742f240734afa37f3054
tests: update test-remotefilelog-gc.t for Python 3.11

The test output changed because test coverage changed because normpath changed:

  $ python3.10 -c 'import os; print(repr(os.path.normpath("asdas\0das")))'
  'asdas\x00das'

  $ python3.11 -c 'import os; print(repr(os.path.normpath("asdas\0das")))'
  'asdas'

diff --git a/tests/test-remotefilelog-gc.t b/tests/test-remotefilelog-gc.t
--- a/tests/test-remotefilelog-gc.t
+++ b/tests/test-remotefilelog-gc.t
@@ -106,6 +106,11 @@
 # Test that warning is displayed when the repo path is malformed
 
   $ printf "asdas\0das" >> $CACHEDIR/repos
+#if py311
+  $ hg gc
+  finished: removed 0 of 4 files (0.00 GB to 0.00 GB)
+#else
   $ hg gc
   abort: invalid path asdas\x00da: .*(null|NULL).* (re)
   [255]
+#endif



More information about the Mercurial-devel mailing list