[pypy-commit] pypy py3k: Fix tests in module/thread
amauryfa
noreply at buildbot.pypy.org
Sat Jan 14 21:48:29 CET 2012
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3k
Changeset: r51320:36af87a5ee11
Date: 2011-12-22 23:52 +0100
http://bitbucket.org/pypy/pypy/changeset/36af87a5ee11/
Log: Fix tests in module/thread
diff --git a/pypy/module/_io/interp_stringio.py b/pypy/module/_io/interp_stringio.py
--- a/pypy/module/_io/interp_stringio.py
+++ b/pypy/module/_io/interp_stringio.py
@@ -12,7 +12,7 @@
self.buf = []
self.pos = 0
- def descr_init(self, space, w_initvalue=None, w_newline="\n"):
+ def descr_init(self, space, w_initvalue=None, w_newline=u"\n"):
# In case __init__ is called multiple times
self.buf = []
self.pos = 0
diff --git a/pypy/module/thread/test/test_import_lock.py b/pypy/module/thread/test/test_import_lock.py
--- a/pypy/module/thread/test/test_import_lock.py
+++ b/pypy/module/thread/test/test_import_lock.py
@@ -66,9 +66,6 @@
def test_lock(self, space, monkeypatch):
from pypy.module.imp.importing import getimportlock, importhook
- # Force importing the module _file now
- space.builtin.get('file')
-
# Monkeypatch the import lock and add a counter
importlock = getimportlock(space)
original_acquire = importlock.acquire_lock
@@ -82,9 +79,9 @@
importhook(space, 'sys')
assert importlock.count == 0
# A new module
- importhook(space, 're')
- assert importlock.count == 7
+ importhook(space, 'pprint')
+ assert importlock.count == 1
# Import it again
previous_count = importlock.count
- importhook(space, 're')
+ importhook(space, 'pprint')
assert importlock.count == previous_count
More information about the pypy-commit
mailing list