[PATCH 3 of 5 STABLE pypy] tests: clear __pycache__ for PyPy compatibility (issue5638) (issue5642)
Yuya Nishihara
yuya at tcha.org
Wed Aug 2 10:22:23 EDT 2017
# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1501679042 -32400
# Wed Aug 02 22:04:02 2017 +0900
# Branch stable
# Node ID 0c342a3b5857d30c71d31e1933bcd2e4ea84be8f
# Parent 50ed00ce37627070546e40305460ec378bb121fb
tests: clear __pycache__ for PyPy compatibility (issue5638) (issue5642)
diff --git a/tests/test-extension.t b/tests/test-extension.t
--- a/tests/test-extension.t
+++ b/tests/test-extension.t
@@ -245,6 +245,7 @@ Check absolute/relative import of extens
#if no-py3k
$ rm "$TESTTMP"/extroot/foo.*
+ $ rm -Rf "$TESTTMP/extroot/__pycache__"
$ cat > $TESTTMP/extroot/foo.py <<EOF
> # test relative import
> buf = []
@@ -1238,6 +1239,7 @@ empty declaration of supported version,
If the extension specifies a buglink, show that:
$ echo 'buglink = "http://example.com/bts"' >> throw.py
$ rm -f throw.pyc throw.pyo
+ $ rm -Rf __pycache__
$ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
** Unknown exception encountered with possibly-broken third-party extension throw
** which supports versions unknown of Mercurial.
@@ -1253,6 +1255,7 @@ If the extensions declare outdated versi
$ echo "testedwith = '1.9.3'" >> older.py
$ echo "testedwith = '2.1.1'" >> throw.py
$ rm -f throw.pyc throw.pyo
+ $ rm -Rf __pycache__
$ hg --config extensions.throw=throw.py --config extensions.older=older.py \
> throw 2>&1 | egrep '^\*\*'
** Unknown exception encountered with possibly-broken third-party extension older
@@ -1266,6 +1269,7 @@ If the extensions declare outdated versi
One extension only tested with older, one only with newer versions:
$ echo "util.version = lambda:'2.1'" >> older.py
$ rm -f older.pyc older.pyo
+ $ rm -Rf __pycache__
$ hg --config extensions.throw=throw.py --config extensions.older=older.py \
> throw 2>&1 | egrep '^\*\*'
** Unknown exception encountered with possibly-broken third-party extension older
@@ -1279,6 +1283,7 @@ One extension only tested with older, on
Older extension is tested with current version, the other only with newer:
$ echo "util.version = lambda:'1.9.3'" >> older.py
$ rm -f older.pyc older.pyo
+ $ rm -Rf __pycache__
$ hg --config extensions.throw=throw.py --config extensions.older=older.py \
> throw 2>&1 | egrep '^\*\*'
** Unknown exception encountered with possibly-broken third-party extension throw
@@ -1305,6 +1310,7 @@ Declare the version as supporting this h
> echo "unable to fetch a mercurial version. Make sure __version__ is correct";
> fi
$ rm -f throw.pyc throw.pyo
+ $ rm -Rf __pycache__
$ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
** unknown exception encountered, please report by visiting
** https://mercurial-scm.org/wiki/BugTracker
@@ -1316,6 +1322,7 @@ Patch version is ignored during compatib
$ echo "testedwith = '3.2'" >> throw.py
$ echo "util.version = lambda:'3.2.2'" >> throw.py
$ rm -f throw.pyc throw.pyo
+ $ rm -Rf __pycache__
$ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
** unknown exception encountered, please report by visiting
** https://mercurial-scm.org/wiki/BugTracker
@@ -1326,6 +1333,7 @@ Patch version is ignored during compatib
Test version number support in 'hg version':
$ echo '__version__ = (1, 2, 3)' >> throw.py
$ rm -f throw.pyc throw.pyo
+ $ rm -Rf __pycache__
$ hg version -v
Mercurial Distributed SCM (version *) (glob)
(see https://mercurial-scm.org for more information)
@@ -1350,6 +1358,7 @@ Test version number support in 'hg versi
throw external 1.2.3
$ echo 'getversion = lambda: "1.twentythree"' >> throw.py
$ rm -f throw.pyc throw.pyo
+ $ rm -Rf __pycache__
$ hg version -v --config extensions.throw=throw.py --config extensions.strip=
Mercurial Distributed SCM (version *) (glob)
(see https://mercurial-scm.org for more information)
diff --git a/tests/test-progress.t b/tests/test-progress.t
--- a/tests/test-progress.t
+++ b/tests/test-progress.t
@@ -312,6 +312,7 @@ of which length of byte sequence and col
from each other.
$ rm -f loop.pyc
+ $ rm -Rf __pycache__
$ cat >> loop.py <<EOF
> # use non-ascii characters as loop items of progress
> loopitems = [
More information about the Mercurial-devel
mailing list