Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
bpo-44019 Address Victor's code review
  • Loading branch information
corona10 committed Oct 21, 2021
commit fa1c3d653ef4375652a94f6f138eb6b9b8008a67
10 changes: 5 additions & 5 deletions Lib/test/test_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,16 @@ def __iter__(self):


class OperatorTestCase:
def test_all_exported_names(self):
def test___all__(self):
operator = self.module
actual_all = set(operator.__all__)
computed_all = set()
for k in vars(operator):
if k.startswith('__'):
for name in vars(operator):
if name.startswith('__'):
continue
value = getattr(operator, k)
value = getattr(operator, name)
if value.__module__ in ('operator', '_operator'):
computed_all.add(k)
computed_all.add(name)
self.assertSetEqual(computed_all, actual_all)

def test_lt(self):
Expand Down