pypy: 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.
This commit is contained in:
Boris Feld 2017-07-31 17:43:45 +02:00
parent 6940437f39
commit 36f3e363cc
2 changed files with 10 additions and 0 deletions

View File

@ -234,7 +234,9 @@ check that local configs for the cached repo aren't inherited when -R is used:
*** 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

View File

@ -270,7 +270,11 @@ Aborting transaction prevents fncache change
> 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 @@ Aborted transactions can be recovered later
> 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