Fix up 3.2 tests

Remove pypy
This commit is contained in:
rocky
2016-05-05 04:41:23 -04:00
parent 109737cbef
commit 6f3a88d7e2
4 changed files with 16 additions and 7 deletions

View File

@@ -28,7 +28,7 @@ check-2.7 check-3.3 check-3.4: pytest
$(MAKE) -C test $@
#: Tests for Python 3.5 - pytest doesn't work here
check-3.5:
check-3.2 check-3.5:
$(MAKE) -C test $@
#:Tests for Python 2.6 (doesn't have pytest)

View File

@@ -22,6 +22,10 @@ check:
#: Run working tests from Python 2.6 or 2.7
check-2.6 check-2.7: check-bytecode-sans-3.5 check-2.7-ok
#: Run working tests from Python 3.2
check-3.2: check-bytecode
$(PYTHON) test_pythonlib.py --bytecode-3.2 --verify $(COMPILE)
#: Run working tests from Python 3.3
check-3.3: check-bytecode
$(PYTHON) test_pythonlib.py --bytecode-3.3 --verify $(COMPILE)

View File

@@ -1,4 +1,4 @@
# Copyright (c) 2015 by Rocky Bernstein
# Copyright (c) 2015, 2016 by Rocky Bernstein
# Copyright (c) 2005 by Dan Pascu <dan@windowmaker.org>
# Copyright (c) 2000-2002 by hartmut Goebel <h.goebel@crazy-compilers.com>
# Copyright (c) 1999 John Aycock
@@ -1558,8 +1558,13 @@ class SourceWalker(GenericASTTraversal, object):
code._tokens = None # save memory
assert ast == 'stmts'
try:
if ast[0][0] == NAME_MODULE:
if self.hide_internal: del ast[0]
elif ast[1][0] == NAME_MODULE:
if self.hide_internal: del ast[1]
pass
except:
pass
qualname = '.'.join(self.classes)
@@ -1579,9 +1584,9 @@ class SourceWalker(GenericASTTraversal, object):
if (ast[0][0] == ASSIGN_DOC_STRING(code.co_consts[0])):
i = 0
do_doc = True
elif (len(ast) > 2 and 3.0 <= self.version <= 3.2 and
ast[2][0] == ASSIGN_DOC_STRING(code.co_consts[0])):
i = 2
elif (len(ast) > 1 and 3.0 <= self.version <= 3.2 and
ast[1][0] == ASSIGN_DOC_STRING(code.co_consts[0])):
i = 1
do_doc = True
if do_doc and self.hide_internal:
self.print_docstring(indent, code.co_consts[0])