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
09b724f6
Commit
09b724f6
authored
Aug 08, 2013
by
Ezio Melotti
Browse files
Options
Browse Files
Download
Plain Diff
#18273: merge with 3.3.
parents
d11133c5
68d7c26a
Changes
21
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
25 additions
and
44 deletions
+25
-44
Lib/test/test_json.py
Lib/test/test_json.py
+0
-17
Lib/test/test_json/__init__.py
Lib/test/test_json/__init__.py
+2
-11
Lib/test/test_json/__main__.py
Lib/test/test_json/__main__.py
+4
-0
Lib/test/test_json/test_decode.py
Lib/test/test_json/test_decode.py
+1
-1
Lib/test/test_json/test_default.py
Lib/test/test_json/test_default.py
+1
-1
Lib/test/test_json/test_dump.py
Lib/test/test_json/test_dump.py
+1
-1
Lib/test/test_json/test_encode_basestring_ascii.py
Lib/test/test_json/test_encode_basestring_ascii.py
+1
-1
Lib/test/test_json/test_fail.py
Lib/test/test_json/test_fail.py
+1
-1
Lib/test/test_json/test_float.py
Lib/test/test_json/test_float.py
+1
-1
Lib/test/test_json/test_indent.py
Lib/test/test_json/test_indent.py
+1
-1
Lib/test/test_json/test_pass1.py
Lib/test/test_json/test_pass1.py
+1
-1
Lib/test/test_json/test_pass2.py
Lib/test/test_json/test_pass2.py
+1
-1
Lib/test/test_json/test_pass3.py
Lib/test/test_json/test_pass3.py
+1
-1
Lib/test/test_json/test_recursion.py
Lib/test/test_json/test_recursion.py
+1
-1
Lib/test/test_json/test_scanstring.py
Lib/test/test_json/test_scanstring.py
+1
-1
Lib/test/test_json/test_separators.py
Lib/test/test_json/test_separators.py
+1
-1
Lib/test/test_json/test_speedups.py
Lib/test/test_json/test_speedups.py
+1
-1
Lib/test/test_json/test_tool.py
Lib/test/test_json/test_tool.py
+0
-0
Lib/test/test_json/test_unicode.py
Lib/test/test_json/test_unicode.py
+1
-1
Makefile.pre.in
Makefile.pre.in
+1
-1
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/test/test_json.py
deleted
100644 → 0
View file @
d11133c5
"""Tests for json.
The tests for json are defined in the json.tests package;
the test_suite() function there returns a test suite that's ready to
be run.
"""
from
test
import
json_tests
import
test.support
def
test_main
():
test
.
support
.
run_unittest
(
json_tests
.
test_suite
())
if
__name__
==
"__main__"
:
test_main
()
Lib/test/
json_tests
/__init__.py
→
Lib/test/
test_json
/__init__.py
View file @
09b724f6
...
@@ -44,12 +44,12 @@ class TestCTest(CTest):
...
@@ -44,12 +44,12 @@ class TestCTest(CTest):
here
=
os
.
path
.
dirname
(
__file__
)
here
=
os
.
path
.
dirname
(
__file__
)
def
test_suite
(
):
def
load_tests
(
*
args
):
suite
=
additional_tests
()
suite
=
additional_tests
()
loader
=
unittest
.
TestLoader
()
loader
=
unittest
.
TestLoader
()
for
fn
in
os
.
listdir
(
here
):
for
fn
in
os
.
listdir
(
here
):
if
fn
.
startswith
(
"test"
)
and
fn
.
endswith
(
".py"
):
if
fn
.
startswith
(
"test"
)
and
fn
.
endswith
(
".py"
):
modname
=
"test.
json_tests
."
+
fn
[:
-
3
]
modname
=
"test.
test_json
."
+
fn
[:
-
3
]
__import__
(
modname
)
__import__
(
modname
)
module
=
sys
.
modules
[
modname
]
module
=
sys
.
modules
[
modname
]
suite
.
addTests
(
loader
.
loadTestsFromModule
(
module
))
suite
.
addTests
(
loader
.
loadTestsFromModule
(
module
))
...
@@ -62,12 +62,3 @@ def additional_tests():
...
@@ -62,12 +62,3 @@ def additional_tests():
suite
.
addTest
(
TestPyTest
(
'test_pyjson'
))
suite
.
addTest
(
TestPyTest
(
'test_pyjson'
))
suite
.
addTest
(
TestCTest
(
'test_cjson'
))
suite
.
addTest
(
TestCTest
(
'test_cjson'
))
return
suite
return
suite
def
main
():
suite
=
test_suite
()
runner
=
unittest
.
TextTestRunner
()
runner
.
run
(
suite
)
if
__name__
==
'__main__'
:
sys
.
path
.
insert
(
0
,
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)))))
main
()
Lib/test/test_json/__main__.py
0 → 100644
View file @
09b724f6
import
unittest
from
test.test_json
import
load_tests
unittest
.
main
()
Lib/test/
json_tests
/test_decode.py
→
Lib/test/
test_json
/test_decode.py
View file @
09b724f6
import
decimal
import
decimal
from
io
import
StringIO
from
io
import
StringIO
from
collections
import
OrderedDict
from
collections
import
OrderedDict
from
test.
json_tests
import
PyTest
,
CTest
from
test.
test_json
import
PyTest
,
CTest
class
TestDecode
:
class
TestDecode
:
...
...
Lib/test/
json_tests
/test_default.py
→
Lib/test/
test_json
/test_default.py
View file @
09b724f6
from
test.
json_tests
import
PyTest
,
CTest
from
test.
test_json
import
PyTest
,
CTest
class
TestDefault
:
class
TestDefault
:
...
...
Lib/test/
json_tests
/test_dump.py
→
Lib/test/
test_json
/test_dump.py
View file @
09b724f6
from
io
import
StringIO
from
io
import
StringIO
from
test.
json_tests
import
PyTest
,
CTest
from
test.
test_json
import
PyTest
,
CTest
from
test.support
import
bigmemtest
,
_1G
from
test.support
import
bigmemtest
,
_1G
...
...
Lib/test/
json_tests
/test_encode_basestring_ascii.py
→
Lib/test/
test_json
/test_encode_basestring_ascii.py
View file @
09b724f6
from
collections
import
OrderedDict
from
collections
import
OrderedDict
from
test.
json_tests
import
PyTest
,
CTest
from
test.
test_json
import
PyTest
,
CTest
CASES
=
[
CASES
=
[
...
...
Lib/test/
json_tests
/test_fail.py
→
Lib/test/
test_json
/test_fail.py
View file @
09b724f6
from
test.
json_tests
import
PyTest
,
CTest
from
test.
test_json
import
PyTest
,
CTest
import
re
import
re
# 2007-10-05
# 2007-10-05
...
...
Lib/test/
json_tests
/test_float.py
→
Lib/test/
test_json
/test_float.py
View file @
09b724f6
import
math
import
math
from
test.
json_tests
import
PyTest
,
CTest
from
test.
test_json
import
PyTest
,
CTest
class
TestFloat
:
class
TestFloat
:
...
...
Lib/test/
json_tests
/test_indent.py
→
Lib/test/
test_json
/test_indent.py
View file @
09b724f6
import
textwrap
import
textwrap
from
io
import
StringIO
from
io
import
StringIO
from
test.
json_tests
import
PyTest
,
CTest
from
test.
test_json
import
PyTest
,
CTest
class
TestIndent
:
class
TestIndent
:
...
...
Lib/test/
json_tests
/test_pass1.py
→
Lib/test/
test_json
/test_pass1.py
View file @
09b724f6
from
test.
json_tests
import
PyTest
,
CTest
from
test.
test_json
import
PyTest
,
CTest
# from http://json.org/JSON_checker/test/pass1.json
# from http://json.org/JSON_checker/test/pass1.json
...
...
Lib/test/
json_tests
/test_pass2.py
→
Lib/test/
test_json
/test_pass2.py
View file @
09b724f6
from
test.
json_tests
import
PyTest
,
CTest
from
test.
test_json
import
PyTest
,
CTest
# from http://json.org/JSON_checker/test/pass2.json
# from http://json.org/JSON_checker/test/pass2.json
...
...
Lib/test/
json_tests
/test_pass3.py
→
Lib/test/
test_json
/test_pass3.py
View file @
09b724f6
from
test.
json_tests
import
PyTest
,
CTest
from
test.
test_json
import
PyTest
,
CTest
# from http://json.org/JSON_checker/test/pass3.json
# from http://json.org/JSON_checker/test/pass3.json
...
...
Lib/test/
json_tests
/test_recursion.py
→
Lib/test/
test_json
/test_recursion.py
View file @
09b724f6
from
test.
json_tests
import
PyTest
,
CTest
from
test.
test_json
import
PyTest
,
CTest
class
JSONTestObject
:
class
JSONTestObject
:
...
...
Lib/test/
json_tests
/test_scanstring.py
→
Lib/test/
test_json
/test_scanstring.py
View file @
09b724f6
import
sys
import
sys
from
test.
json_tests
import
PyTest
,
CTest
from
test.
test_json
import
PyTest
,
CTest
class
TestScanstring
:
class
TestScanstring
:
...
...
Lib/test/
json_tests
/test_separators.py
→
Lib/test/
test_json
/test_separators.py
View file @
09b724f6
import
textwrap
import
textwrap
from
test.
json_tests
import
PyTest
,
CTest
from
test.
test_json
import
PyTest
,
CTest
class
TestSeparators
:
class
TestSeparators
:
...
...
Lib/test/
json_tests
/test_speedups.py
→
Lib/test/
test_json
/test_speedups.py
View file @
09b724f6
from
test.
json_tests
import
CTest
from
test.
test_json
import
CTest
class
TestSpeedups
(
CTest
):
class
TestSpeedups
(
CTest
):
...
...
Lib/test/
json_tests
/test_tool.py
→
Lib/test/
test_json
/test_tool.py
View file @
09b724f6
File moved
Lib/test/
json_tests
/test_unicode.py
→
Lib/test/
test_json
/test_unicode.py
View file @
09b724f6
from
collections
import
OrderedDict
from
collections
import
OrderedDict
from
test.
json_tests
import
PyTest
,
CTest
from
test.
test_json
import
PyTest
,
CTest
class
TestUnicode
:
class
TestUnicode
:
...
...
Makefile.pre.in
View file @
09b724f6
...
@@ -1079,7 +1079,7 @@ LIBSUBDIRS= tkinter tkinter/test tkinter/test/test_tkinter \
...
@@ -1079,7 +1079,7 @@ LIBSUBDIRS= tkinter tkinter/test tkinter/test/test_tkinter \
test
/namespace_pkgs/module_and_namespace_package/a_test
\
test
/namespace_pkgs/module_and_namespace_package/a_test
\
collections concurrent concurrent/futures encodings
\
collections concurrent concurrent/futures encodings
\
email email/mime
test
/test_email
test
/test_email/data
\
email email/mime
test
/test_email
test
/test_email/data
\
html json
test
/
json_tests
http dbm xmlrpc
\
html json
test
/
test_json
http dbm xmlrpc
\
sqlite3 sqlite3/test
\
sqlite3 sqlite3/test
\
logging csv wsgiref urllib
\
logging csv wsgiref urllib
\
lib2to3 lib2to3/fixes lib2to3/pgen2 lib2to3/tests
\
lib2to3 lib2to3/fixes lib2to3/pgen2 lib2to3/tests
\
...
...
Misc/NEWS
View file @
09b724f6
...
@@ -634,6 +634,9 @@ Library
...
@@ -634,6 +634,9 @@ Library
Tests
Tests
-----
-----
- Issue #18273: move the tests in Lib/test/json_tests to Lib/test/test_json
and make them discoverable by unittest. Patch by Zachary Ware.
- Fix a fcntl test case on KFreeBSD, Debian #708653 (Petr Salinger).
- Fix a fcntl test case on KFreeBSD, Debian #708653 (Petr Salinger).
- Issue #18396: Fix spurious test failure in test_signal on Windows when
- Issue #18396: Fix spurious test failure in test_signal on Windows when
...
...
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