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
63714460
Commit
63714460
authored
May 19, 2015
by
R David Murray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#24215: also back out changeset that broke test_trace in 3.4.
I missed that this change was applied to both branches.
parent
ae760c0a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
Lib/test/test_pprint.py
Lib/test/test_pprint.py
+9
-8
No files found.
Lib/test/test_pprint.py
View file @
63714460
...
...
@@ -58,8 +58,7 @@ class QueryTestCase(unittest.TestCase):
def
test_basic
(
self
):
# Verify .isrecursive() and .isreadable() w/o recursion
pp
=
pprint
.
PrettyPrinter
()
for
safe
in
(
2
,
2.0
,
2j
,
"abc"
,
[
3
],
(
2
,
2
),
{
3
:
3
},
b"def"
,
bytearray
(
b"ghi"
),
True
,
False
,
None
,
for
safe
in
(
2
,
2.0
,
2j
,
"abc"
,
[
3
],
(
2
,
2
),
{
3
:
3
},
"yaddayadda"
,
self
.
a
,
self
.
b
):
# module-level convenience functions
self
.
assertFalse
(
pprint
.
isrecursive
(
safe
),
...
...
@@ -129,23 +128,21 @@ class QueryTestCase(unittest.TestCase):
# it sorted a dict display if and only if the display required
# multiple lines. For that reason, dicts with more than one element
# aren't tested here.
for
simple
in
(
0
,
0
,
0
+
0j
,
0.0
,
""
,
b""
,
bytearray
(),
for
simple
in
(
0
,
0
,
0
+
0j
,
0.0
,
""
,
b""
,
(),
tuple2
(),
tuple3
(),
[],
list2
(),
list3
(),
set
(),
set2
(),
set3
(),
frozenset
(),
frozenset2
(),
frozenset3
(),
{},
dict2
(),
dict3
(),
self
.
assertTrue
,
pprint
,
-
6
,
-
6
,
-
6
-
6j
,
-
1.5
,
"x"
,
b"x"
,
bytearray
(
b"x"
),
(
3
,),
[
3
],
{
3
:
6
},
-
6
,
-
6
,
-
6
-
6j
,
-
1.5
,
"x"
,
b"x"
,
(
3
,),
[
3
],
{
3
:
6
},
(
1
,
2
),
[
3
,
4
],
{
5
:
6
},
tuple2
((
1
,
2
)),
tuple3
((
1
,
2
)),
tuple3
(
range
(
100
)),
[
3
,
4
],
list2
([
3
,
4
]),
list3
([
3
,
4
]),
list3
(
range
(
100
)),
set
({
7
}),
set2
({
7
}),
set3
({
7
}),
frozenset
({
8
}),
frozenset2
({
8
}),
frozenset3
({
8
}),
dict2
({
5
:
6
}),
dict3
({
5
:
6
}),
range
(
10
,
-
11
,
-
1
),
True
,
False
,
None
,
range
(
10
,
-
11
,
-
1
)
):
native
=
repr
(
simple
)
self
.
assertEqual
(
pprint
.
pformat
(
simple
),
native
)
...
...
@@ -600,5 +597,9 @@ class DottedPrettyPrinter(pprint.PrettyPrinter):
self
,
object
,
context
,
maxlevels
,
level
)
def
test_main
():
test
.
support
.
run_unittest
(
QueryTestCase
)
if
__name__
==
"__main__"
:
unittest
.
main
()
test_
main
()
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