Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
90939a9b
Commit
90939a9b
authored
May 04, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #468 from rntz/master
minor tester & test fixes for python microrevision compatibility
parents
3808e4ea
a9ffc453
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
7 deletions
+10
-7
test/tests/exec_syntax_error.py
test/tests/exec_syntax_error.py
+4
-3
test/tests/name_forcing_syntax_error.py
test/tests/name_forcing_syntax_error.py
+1
-1
tools/tester.py
tools/tester.py
+5
-3
No files found.
test/tests/exec_syntax_error.py
View file @
90939a9b
s
=
"""
s
=
"""
def f():
def f():
a = 1
a = 1
...
@@ -11,7 +10,8 @@ f()
...
@@ -11,7 +10,8 @@ f()
try
:
try
:
exec
s
exec
s
except
Exception
as
e
:
except
Exception
as
e
:
print
repr
(
e
)
# avoid microrevision changes to Python error messages
print
repr
(
e
).
replace
(
"because "
,
""
)
s
=
"""
s
=
"""
def f():
def f():
...
@@ -27,4 +27,5 @@ f()
...
@@ -27,4 +27,5 @@ f()
try
:
try
:
exec
s
exec
s
except
Exception
as
e
:
except
Exception
as
e
:
print
repr
(
e
)
# avoid microrevision changes to Python error messages
print
repr
(
e
).
replace
(
"because "
,
""
)
test/tests/name_forcing_syntax_error.py
View file @
90939a9b
...
@@ -208,6 +208,6 @@ for case in cases:
...
@@ -208,6 +208,6 @@ for case in cases:
try
:
try
:
exec
case
exec
case
except
SyntaxError
as
se
:
except
SyntaxError
as
se
:
print
se
.
message
print
se
.
message
.
replace
(
"because "
,
""
)
# TODO uncomment this
# TODO uncomment this
# traceback.print_exc()
# traceback.print_exc()
tools/tester.py
View file @
90939a9b
...
@@ -125,6 +125,8 @@ def canonicalize_stderr(stderr):
...
@@ -125,6 +125,8 @@ def canonicalize_stderr(stderr):
(
"AttributeError: '(
\
w+)
'
object attribute '(
\
w+)
'
is read-only"
,
"AttributeError:
\
\
2"
),
(
"AttributeError: '(
\
w+)
'
object attribute '(
\
w+)
'
is read-only"
,
"AttributeError:
\
\
2"
),
(
r"TypeError: object.__new__\
(
\) takes no parameters"
,
"TypeError: object() takes no parameters"
),
(
r"TypeError: object.__new__\
(
\) takes no parameters"
,
"TypeError: object() takes no parameters"
),
(
"IndexError: list assignment index out of range"
,
"IndexError: list index out of range"
),
(
"IndexError: list assignment index out of range"
,
"IndexError: list index out of range"
),
(
r"unqualified exec is not allowed in function '(\
w+)
' it (.*)"
,
r"unqualified exec is not allowed in function '\1' because it \2"
),
]
]
for
pattern
,
subst_with
in
substitutions
:
for
pattern
,
subst_with
in
substitutions
:
...
@@ -206,9 +208,6 @@ def get_test_options(fn, check_stats, run_memcheck):
...
@@ -206,9 +208,6 @@ def get_test_options(fn, check_stats, run_memcheck):
elif
os
.
path
.
basename
(
fn
).
split
(
'.'
)[
0
]
in
TESTS_TO_SKIP
:
elif
os
.
path
.
basename
(
fn
).
split
(
'.'
)[
0
]
in
TESTS_TO_SKIP
:
opts
.
skip
=
'command line option'
opts
.
skip
=
'command line option'
if
opts
.
collect_stats
:
opts
.
jit_args
=
[
'-s'
]
+
opts
.
jit_args
assert
opts
.
expected
in
(
"success"
,
"fail"
,
"statfail"
),
opts
.
expected
assert
opts
.
expected
in
(
"success"
,
"fail"
,
"statfail"
),
opts
.
expected
if
TEST_PYPY
:
if
TEST_PYPY
:
...
@@ -217,6 +216,9 @@ def get_test_options(fn, check_stats, run_memcheck):
...
@@ -217,6 +216,9 @@ def get_test_options(fn, check_stats, run_memcheck):
opts
.
check_stats
=
False
opts
.
check_stats
=
False
opts
.
expected
=
"success"
opts
.
expected
=
"success"
if
opts
.
collect_stats
:
opts
.
jit_args
=
[
'-s'
]
+
opts
.
jit_args
return
opts
return
opts
def
determine_test_result
(
fn
,
opts
,
code
,
out
,
stderr
,
elapsed
):
def
determine_test_result
(
fn
,
opts
,
code
,
out
,
stderr
,
elapsed
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment