@@ -36,7 +36,7 @@ def test_record_evaluation_event_buffers_event(
3636@pytest .mark .parametrize (
3737 "second_enabled, expected_count" ,
3838 [
39- (True , 1 ), # same fingerprint -> deduplicated
39+ (True , 1 ), # same fingerprint -> deduplicated
4040 (False , 2 ), # different fingerprint -> both kept
4141 ],
4242)
@@ -49,7 +49,10 @@ def test_evaluation_event_deduplication(
4949 flag_key = "my_flag" , enabled = True , value = "v1" , identity_identifier = "user1"
5050 )
5151 pipeline_analytics_processor .record_evaluation_event (
52- flag_key = "my_flag" , enabled = second_enabled , value = "v1" , identity_identifier = "user1"
52+ flag_key = "my_flag" ,
53+ enabled = second_enabled ,
54+ value = "v1" ,
55+ identity_identifier = "user1" ,
5356 )
5457
5558 assert len (pipeline_analytics_processor ._buffer ) == expected_count
@@ -72,9 +75,7 @@ def test_dedup_keys_cleared_after_flush(
7275
7376
7477def test_auto_flush_on_buffer_full () -> None :
75- config = PipelineAnalyticsConfig (
76- analytics_server_url = "http://test/" , max_buffer = 5
77- )
78+ config = PipelineAnalyticsConfig (analytics_server_url = "http://test/" , max_buffer = 5 )
7879 processor = PipelineAnalyticsProcessor (config = config , environment_key = "key" )
7980
8081 with mock .patch ("flagsmith.analytics.session" ):
@@ -186,9 +187,7 @@ def test_start_stop_lifecycle() -> None:
186187 assert processor ._timer .is_alive ()
187188
188189 with mock .patch ("flagsmith.analytics.session" ):
189- processor .record_evaluation_event (
190- flag_key = "my_flag" , enabled = True , value = "v1"
191- )
190+ processor .record_evaluation_event (flag_key = "my_flag" , enabled = True , value = "v1" )
192191 processor .stop ()
193192
194193 assert len (processor ._buffer ) == 0
0 commit comments