Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Kirill Smelkov
cpython
Commits
cc99cd70
Commit
cc99cd70
authored
Nov 08, 2015
by
Martin Panter
Browse files
Options
Browse Files
Download
Plain Diff
Issue #24802: Merge ValueError test case from 3.5
parents
7861667c
d61d860e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
Lib/test/test_compile.py
Lib/test/test_compile.py
+2
-3
No files found.
Lib/test/test_compile.py
View file @
cc99cd70
...
...
@@ -545,10 +545,9 @@ if 1:
def
test_null_terminated
(
self
):
# The source code is null-terminated internally, but bytes-like
# objects are accepted, which could be not terminated.
# Exception changed from TypeError to ValueError in 3.5
with
self
.
assertRaisesRegex
(
Exception
,
"cannot contain null"
):
with
self
.
assertRaisesRegex
(
ValueError
,
"cannot contain null"
):
compile
(
"123
\
x00
"
,
"<dummy>"
,
"eval"
)
with
self
.
assertRaisesRegex
(
Exception
,
"cannot contain null"
):
with
self
.
assertRaisesRegex
(
ValueError
,
"cannot contain null"
):
compile
(
memoryview
(
b"123
\
x00
"
),
"<dummy>"
,
"eval"
)
code
=
compile
(
memoryview
(
b"123
\
x00
"
)[
1
:
-
1
],
"<dummy>"
,
"eval"
)
self
.
assertEqual
(
eval
(
code
),
23
)
...
...
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