Skip to content

Commit b948f58

Browse files
committed
fixed test_object_indexer to pass on custom class key
1 parent 0e4b3ad commit b948f58

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/tests/test_indexer.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -438,13 +438,13 @@ def test_object_indexer():
438438
ob[long(1)] = "long"
439439
assert ob[long(1)] == "long"
440440

441-
with pytest.raises(TypeError):
442-
class Eggs(object):
443-
pass
441+
class Eggs(object):
442+
pass
444443

445-
key = Eggs()
446-
ob = Test.ObjectIndexerTest()
447-
ob[key] = "wrong"
444+
key = Eggs()
445+
ob = Test.ObjectIndexerTest()
446+
ob[key] = "eggs_key"
447+
assert ob[key] == "eggs_key"
448448

449449

450450
def test_interface_indexer():

0 commit comments

Comments
 (0)