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
4f95a52f
Commit
4f95a52f
authored
Apr 13, 2011
by
Ezio Melotti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#9233: skip _json-specific tests when _json is not available.
parent
a8b0f9ad
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
Lib/json/tests/test_scanstring.py
Lib/json/tests/test_scanstring.py
+7
-1
Lib/json/tests/test_speedups.py
Lib/json/tests/test_speedups.py
+7
-1
No files found.
Lib/json/tests/test_scanstring.py
View file @
4f95a52f
import
sys
import
decimal
from
unittest
import
TestCase
from
unittest
import
TestCase
,
skipUnless
import
json
import
json.decoder
try
:
import
_json
except
ImportError
:
_json
=
None
class
TestScanString
(
TestCase
):
def
test_py_scanstring
(
self
):
self
.
_test_scanstring
(
json
.
decoder
.
py_scanstring
)
@
skipUnless
(
_json
,
'test requires the _json module'
)
def
test_c_scanstring
(
self
):
if
json
.
decoder
.
c_scanstring
is
not
None
:
self
.
_test_scanstring
(
json
.
decoder
.
c_scanstring
)
...
...
Lib/json/tests/test_speedups.py
View file @
4f95a52f
import
decimal
from
unittest
import
TestCase
from
unittest
import
TestCase
,
skipUnless
from
json
import
decoder
,
encoder
,
scanner
try
:
import
_json
except
ImportError
:
_json
=
None
@
skipUnless
(
_json
,
'test requires the _json module'
)
class
TestSpeedups
(
TestCase
):
def
test_scanstring
(
self
):
self
.
assertEqual
(
decoder
.
scanstring
.
__module__
,
"_json"
)
...
...
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