[PATCH 1 of 2 pypy] Fix failing test files with Pypy5.6.0

Boris Feld boris.feld at octobus.net
Mon Jul 31 15:46:10 UTC 2017


# HG changeset patch
# User Boris Feld <boris.feld at octobus.net>
# Date 1501515825 -7200
#      Mon Jul 31 17:43:45 2017 +0200
# Branch stable
# Node ID 9dfca91aab1f705652beeb9c29d213d8ff8b25aa
# Parent  025017423e532037e470e3e5e9b845cba5c4e710
# EXP-Topic pypy5.6.0-compat
Fix failing test files with Pypy5.6.0

Pypy 5.6.0 saves cached bytecode files in __pycache__ directory, clean them in
tests to fix loading old test extensions code.

Doing so should also helps for Python3.x migration.

diff -r 025017423e53 -r 9dfca91aab1f tests/test-commandserver.t
--- a/tests/test-commandserver.t	Fri Jul 21 10:46:31 2017 -0400
+++ b/tests/test-commandserver.t	Mon Jul 31 17:43:45 2017 +0200
@@ -234,7 +234,9 @@
   *** runcommand --config hooks.pre-identify=python:hook.hook id
   eff892de26ec tip
 
+Clean hook cached version
   $ rm hook.py*
+  $ rm -Rf __pycache__
 
   $ echo a >> a
   >>> import os
diff -r 025017423e53 -r 9dfca91aab1f tests/test-fncache.t
--- a/tests/test-fncache.t	Fri Jul 21 10:46:31 2017 -0400
+++ b/tests/test-fncache.t	Mon Jul 31 17:43:45 2017 +0200
@@ -270,7 +270,11 @@
   > cmdtable = {}
   > 
   > EOF
+
+Clean cached version
   $ rm -f "${extpath}c"
+  $ rm -Rf "$(dirname $extpath)/__pycache__"
+
   $ touch z
   $ hg ci -qAm z
   transaction abort!
@@ -305,7 +309,11 @@
   > cmdtable = {}
   > 
   > EOF
+
+Clean cached versions
   $ rm -f "${extpath}c"
+  $ rm -Rf "$(dirname $extpath)/__pycache__"
+
   $ hg up -q 1
   $ touch z
   $ hg ci -qAm z 2>/dev/null


More information about the Mercurial-devel mailing list