Skip to content

Commit

Permalink
Add tests for bool values
Browse files Browse the repository at this point in the history
  • Loading branch information
finefoot authored May 16, 2022
1 parent 5f39d2f commit 7cc9fc8
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions Lib/test/test_reprlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ def test_valid_indent(self):
'object': (),
'tests': (
(dict(indent=None), '()'),
(dict(indent=False), '()'),
(dict(indent=True), '()'),
(dict(indent=0), '()'),
(dict(indent=1), '()'),
(dict(indent=4), '()'),
Expand All @@ -244,6 +246,8 @@ def test_valid_indent(self):
'object': '',
'tests': (
(dict(indent=None), "''"),
(dict(indent=False), "''"),
(dict(indent=True), "''"),
(dict(indent=0), "''"),
(dict(indent=1), "''"),
(dict(indent=4), "''"),
Expand All @@ -258,6 +262,24 @@ def test_valid_indent(self):
'tests': (
(dict(indent=None), '''\
[1, 'spam', {'eggs': True, 'ham': []}]'''),
(dict(indent=False), '''\
[
1,
'spam',
{
'eggs': True,
'ham': [],
},
]'''),
(dict(indent=True), '''\
[
1,
'spam',
{
'eggs': True,
'ham': [],
},
]'''),
(dict(indent=0), '''\
[
1,
Expand Down Expand Up @@ -334,6 +356,46 @@ def test_valid_indent(self):
'tests': (
(dict(indent=None), '''\
{1: 'two', b'three': [(4.5, 6.7), [{8, 9}, frozenset({10, 11})]]}'''),
(dict(indent=False), '''\
{
1: 'two',
b'three': [
(
4.5,
6.7,
),
[
{
8,
9,
},
frozenset({
10,
11,
}),
],
],
}'''),
(dict(indent=True), '''\
{
1: 'two',
b'three': [
(
4.5,
6.7,
),
[
{
8,
9,
},
frozenset({
10,
11,
}),
],
],
}'''),
(dict(indent=0), '''\
{
1: 'two',
Expand Down

0 comments on commit 7cc9fc8

Please sign in to comment.