2525
2626@pytest .fixture ()
2727def dup_txn_receipt (w3 , indexed_event_contract , wait_for_transaction , event_contract ):
28-
2928 emitter_fn = indexed_event_contract .functions .logTwoEvents
3029
3130 txn_hash = emitter_fn (12345 ).transact ()
@@ -557,7 +556,6 @@ def test_event_rich_log(
557556 process_receipt ,
558557 expected_args ,
559558):
560-
561559 emitter_fn = emitter .functions [contract_fn ]
562560 if hasattr (emitter_contract_event_ids , event_name ):
563561 event_id = getattr (emitter_contract_event_ids , event_name )
@@ -821,7 +819,6 @@ def test_event_rich_log_non_strict(
821819 process_receipt ,
822820 expected_args ,
823821):
824-
825822 emitter_fn = non_strict_emitter .functions [contract_fn ]
826823 if hasattr (emitter_contract_event_ids , event_name ):
827824 event_id = getattr (emitter_contract_event_ids , event_name )
@@ -929,7 +926,6 @@ def test_receipt_processing_with_ignore_flag(
929926
930927
931928def test_receipt_processing_with_warn_flag (indexed_event_contract , dup_txn_receipt ):
932-
933929 event_instance = indexed_event_contract .events .LogSingleWithIndex ()
934930
935931 with pytest .warns (UserWarning , match = "Expected 1 log topics. Got 0" ):
@@ -938,23 +934,20 @@ def test_receipt_processing_with_warn_flag(indexed_event_contract, dup_txn_recei
938934
939935
940936def test_receipt_processing_with_strict_flag (indexed_event_contract , dup_txn_receipt ):
941-
942937 event_instance = indexed_event_contract .events .LogSingleWithIndex ()
943938
944939 with pytest .raises (LogTopicError , match = "Expected 1 log topics. Got 0" ):
945940 event_instance .process_receipt (dup_txn_receipt , errors = STRICT )
946941
947942
948943def test_receipt_processing_with_invalid_flag (indexed_event_contract , dup_txn_receipt ):
949-
950944 event_instance = indexed_event_contract .events .LogSingleWithIndex ()
951945
952946 with pytest .raises (AttributeError , match = "Error flag must be one of: " ):
953947 event_instance .process_receipt (dup_txn_receipt , errors = "not-a-flag" )
954948
955949
956950def test_receipt_processing_with_no_flag (indexed_event_contract , dup_txn_receipt ):
957-
958951 event_instance = indexed_event_contract .events .LogSingleWithIndex ()
959952
960953 with pytest .warns (UserWarning , match = "Expected 1 log topics. Got 0" ):
0 commit comments