Author: Amaury Forgeot d'Arc <[email protected]>
Branch: py3k
Changeset: r51915:d6dfa54f243c
Date: 2012-01-28 10:04 +0100
http://bitbucket.org/pypy/pypy/changeset/d6dfa54f243c/
Log: Fix geninterp tests, and give up with the unicode tests: Parsing 2.x
code to build 3.x operations is not a good idea anyway.
diff --git a/pypy/translator/test/snippet.py b/pypy/translator/test/snippet.py
--- a/pypy/translator/test/snippet.py
+++ b/pypy/translator/test/snippet.py
@@ -657,7 +657,7 @@
return issubclass(type(x), (int, long)) and issubclass(type(y), int)
def t_neg_long():
- return -132L
+ return -132
def t_attrerror(x):
try:
diff --git a/pypy/translator/test/test_geninterp.py
b/pypy/translator/test/test_geninterp.py
--- a/pypy/translator/test/test_geninterp.py
+++ b/pypy/translator/test/test_geninterp.py
@@ -43,9 +43,6 @@
def import_sys_func():
import sys
return sys.__name__
-
- def unicode_test(x):
- return unicode(x, 'ascii')
"""
def setup_class(cls):
@@ -288,12 +285,7 @@
def test_negative_long(self):
fn = self.build_interpfunc(snippet.t_neg_long)
result = fn()
- assert result == -132L and type(result) is long
-
- def test_unicode_with_encoding(self):
- fn = self.build_interpfunc(snippet.unicode_test)
- result = fn("abc")
- assert result == u"abc" and type(result) is unicode
+ assert result == -132 and type(result) is int
def test_attributeerror(self):
fn = self.build_interpfunc(snippet.t_attrerror)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit