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
0e3a4c80
Commit
0e3a4c80
authored
Aug 18, 2012
by
Antoine Pitrou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #15615: Add some tests for the json module's handling of invalid input data.
Patch by Kushal Das.
parent
2de4be2e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
0 deletions
+13
-0
Lib/json/tests/test_decode.py
Lib/json/tests/test_decode.py
+9
-0
Misc/ACKS
Misc/ACKS
+1
-0
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/json/tests/test_decode.py
View file @
0e3a4c80
...
...
@@ -45,6 +45,15 @@ class TestDecode(object):
object_hook
=
lambda
x
:
None
),
OrderedDict
(
p
))
def
test_extra_data
(
self
):
s
=
'[1, 2, 3]5'
msg
=
'Extra data'
self
.
assertRaisesRegexp
(
ValueError
,
msg
,
self
.
loads
,
s
)
def
test_invalid_escape
(
self
):
s
=
'["abc
\
\
y"]'
msg
=
'escape'
self
.
assertRaisesRegexp
(
ValueError
,
msg
,
self
.
loads
,
s
)
class
TestPyDecode
(
TestDecode
,
PyTest
):
pass
class
TestCDecode
(
TestDecode
,
CTest
):
pass
Misc/ACKS
View file @
0e3a4c80
...
...
@@ -194,6 +194,7 @@ Evan Dandrea
Eric Daniel
Scott David Daniels
Ben Darnell
Kushal Das
Jonathan Dasteel
John DeGood
Ned Deily
...
...
Misc/NEWS
View file @
0e3a4c80
...
...
@@ -335,6 +335,9 @@ Library
Tests
-----
-
Issue
#
15615
:
Add
some
tests
for
the
json
module
's handling of invalid
input data. Patch by Kushal Das.
- Issue #15496: Add directory removal helpers for tests on Windows.
Patch by Jeremy Kloth.
...
...
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