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
b7bfe4be
Commit
b7bfe4be
authored
Mar 02, 2003
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Typo repairs in new code.
parent
44f14b03
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
Lib/test/test_sets.py
Lib/test/test_sets.py
+7
-3
No files found.
Lib/test/test_sets.py
View file @
b7bfe4be
...
...
@@ -235,7 +235,7 @@ class TestBinaryOps(unittest.TestCase):
self
.
assertRaises
(
TypeError
,
cmp
,
a
,
b
)
# You can view this as a buglet: cmp(a, a) does not raise TypeError,
# because __eq__ is tried before __cmp__, and a.__eq__(a) returns,
# because __eq__ is tried before __cmp__, and a.__eq__(a) returns
True
,
# which Python thinks is good enough to synthesize a cmp() result
# without calling __cmp__.
self
.
assertEqual
(
cmp
(
a
,
a
),
0
)
...
...
@@ -492,13 +492,17 @@ class TestOnlySetsInBinaryOps(unittest.TestCase):
self
.
assertEqual
(
self
.
other
!=
self
.
set
,
True
)
self
.
assertEqual
(
self
.
set
!=
self
.
other
,
True
)
def
test_ge_gt_lt_le
(
self
):
# Unlike the others, this is testing that == and != *are* allowed.
def
test_ge_gt_le_lt
(
self
):
self
.
assertRaises
(
TypeError
,
lambda
:
self
.
set
<
self
.
other
)
self
.
assertRaises
(
TypeError
,
lambda
:
self
.
set
<=
self
.
other
)
self
.
assertRaises
(
TypeError
,
lambda
:
self
.
set
>
self
.
other
)
self
.
assertRaises
(
TypeError
,
lambda
:
self
.
set
>=
self
.
other
)
self
.
assertRaises
(
TypeError
,
lambda
:
self
.
other
<
self
.
set
)
self
.
assertRaises
(
TypeError
,
lambda
:
self
.
other
<=
self
.
set
)
self
.
assertRaises
(
TypeError
,
lambda
:
self
.
other
>
self
.
set
)
self
.
assertRaises
(
TypeError
,
lambda
:
self
.
other
>=
self
.
set
)
def
test_union_update
(
self
):
try
:
self
.
set
|=
self
.
other
...
...
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