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
3fa1aaeb
Commit
3fa1aaeb
authored
Mar 26, 2013
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #17516: do not create useless tuple: remove dummy commas in tests
parent
765531d2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
11 deletions
+11
-11
Lib/test/test_bisect.py
Lib/test/test_bisect.py
+4
-4
Lib/test/test_cmd_line.py
Lib/test/test_cmd_line.py
+2
-2
Lib/test/test_long.py
Lib/test/test_long.py
+1
-1
Lib/test/test_optparse.py
Lib/test/test_optparse.py
+4
-4
No files found.
Lib/test/test_bisect.py
View file @
3fa1aaeb
...
...
@@ -120,10 +120,10 @@ class TestBisect:
def
test_negative_lo
(
self
):
# Issue 3301
mod
=
self
.
module
self
.
assertRaises
(
ValueError
,
mod
.
bisect_left
,
[
1
,
2
,
3
],
5
,
-
1
,
3
)
,
self
.
assertRaises
(
ValueError
,
mod
.
bisect_right
,
[
1
,
2
,
3
],
5
,
-
1
,
3
)
,
self
.
assertRaises
(
ValueError
,
mod
.
insort_left
,
[
1
,
2
,
3
],
5
,
-
1
,
3
)
,
self
.
assertRaises
(
ValueError
,
mod
.
insort_right
,
[
1
,
2
,
3
],
5
,
-
1
,
3
)
,
self
.
assertRaises
(
ValueError
,
mod
.
bisect_left
,
[
1
,
2
,
3
],
5
,
-
1
,
3
)
self
.
assertRaises
(
ValueError
,
mod
.
bisect_right
,
[
1
,
2
,
3
],
5
,
-
1
,
3
)
self
.
assertRaises
(
ValueError
,
mod
.
insort_left
,
[
1
,
2
,
3
],
5
,
-
1
,
3
)
self
.
assertRaises
(
ValueError
,
mod
.
insort_right
,
[
1
,
2
,
3
],
5
,
-
1
,
3
)
def
test_large_range
(
self
):
# Issue 13496
...
...
Lib/test/test_cmd_line.py
View file @
3fa1aaeb
...
...
@@ -98,9 +98,9 @@ class CmdLineTest(unittest.TestCase):
assert_python_failure('
-
m
', '
fnord43520xyz
')
# Check the runpy module also gives an error for
# a nonexistent module
assert_python_failure('
-
m
', '
runpy
', '
fnord43520xyz
')
,
assert_python_failure('
-
m
', '
runpy
', '
fnord43520xyz
')
# All good if module is located and run successfully
assert_python_ok('
-
m
', '
timeit
', '
-
n
', '
1
')
,
assert_python_ok('
-
m
', '
timeit
', '
-
n
', '
1
')
def test_run_module_bug1764407(self):
# -m and -i need to play well together
...
...
Lib/test/test_long.py
View file @
3fa1aaeb
...
...
@@ -1086,7 +1086,7 @@ class LongTest(unittest.TestCase):
self
.
assertRaises
(
OverflowError
,
(
256
).
to_bytes
,
1
,
'big'
,
signed
=
True
)
self
.
assertRaises
(
OverflowError
,
(
256
).
to_bytes
,
1
,
'little'
,
signed
=
False
)
self
.
assertRaises
(
OverflowError
,
(
256
).
to_bytes
,
1
,
'little'
,
signed
=
True
)
self
.
assertRaises
(
OverflowError
,
(
-
1
).
to_bytes
,
2
,
'big'
,
signed
=
False
)
,
self
.
assertRaises
(
OverflowError
,
(
-
1
).
to_bytes
,
2
,
'big'
,
signed
=
False
)
self
.
assertRaises
(
OverflowError
,
(
-
1
).
to_bytes
,
2
,
'little'
,
signed
=
False
)
self
.
assertEqual
((
0
).
to_bytes
(
0
,
'big'
),
b''
)
self
.
assertEqual
((
1
).
to_bytes
(
5
,
'big'
),
b'
\
x00
\
x00
\
x00
\
x00
\
x01
'
)
...
...
Lib/test/test_optparse.py
View file @
3fa1aaeb
...
...
@@ -730,7 +730,7 @@ class TestStandard(BaseTest):
def
test_short_and_long_option_split
(
self
):
self
.
assertParseOK
([
"-a"
,
"xyz"
,
"--foo"
,
"bar"
],
{
'a'
:
'xyz'
,
'boo'
:
None
,
'foo'
:
[
"bar"
]},
[])
,
[])
def
test_short_option_split_long_option_append
(
self
):
self
.
assertParseOK
([
"--foo=bar"
,
"-b"
,
"123"
,
"--foo"
,
"baz"
],
...
...
@@ -740,15 +740,15 @@ class TestStandard(BaseTest):
def
test_short_option_split_one_positional_arg
(
self
):
self
.
assertParseOK
([
"-a"
,
"foo"
,
"bar"
],
{
'a'
:
"foo"
,
'boo'
:
None
,
'foo'
:
None
},
[
"bar"
])
,
[
"bar"
])
def
test_short_option_consumes_separator
(
self
):
self
.
assertParseOK
([
"-a"
,
"--"
,
"foo"
,
"bar"
],
{
'a'
:
"--"
,
'boo'
:
None
,
'foo'
:
None
},
[
"foo"
,
"bar"
])
,
[
"foo"
,
"bar"
])
self
.
assertParseOK
([
"-a"
,
"--"
,
"--foo"
,
"bar"
],
{
'a'
:
"--"
,
'boo'
:
None
,
'foo'
:
[
"bar"
]},
[])
,
[])
def
test_short_option_joined_and_separator
(
self
):
self
.
assertParseOK
([
"-ab"
,
"--"
,
"--foo"
,
"bar"
],
...
...
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