@@ -427,32 +427,26 @@ def test_server_url_joining(elasticapm_client, expected):
427427
428428
429429@pytest .mark .parametrize (
430- "version,raises,pending " ,
430+ "version" ,
431431 [
432- (( "2" , "7" , "0" ), True , True ),
433- (( "3" , "3" , "0" ), True , False ),
434- (( "3" , "4" , "0" ), True , False ),
435- (( "3" , "5" , "0" ), False , False ),
432+ ("2" , "7" , "0" ),
433+ ("3" , "3" , "0" ),
434+ ("3" , "4" , "0" ),
435+ ("3" , "5" , "0" ),
436436 ],
437437)
438438@mock .patch ("platform.python_version_tuple" )
439- def test_python_version_deprecation (mock_python_version_tuple , version , raises , pending , recwarn ):
439+ def test_python_version_deprecation (mock_python_version_tuple , version ):
440440 warnings .simplefilter ("always" )
441441
442442 mock_python_version_tuple .return_value = version
443443 e = None
444- try :
445- e = elasticapm .Client ()
446- finally :
447- if e :
448- e .close ()
449- if raises :
450- if pending :
451- w = recwarn .pop (PendingDeprecationWarning )
452- assert "will stop supporting" in w .message .args [0 ]
453- else :
454- w = recwarn .pop (DeprecationWarning )
455- assert "agent only supports" in w .message .args [0 ]
444+ with pytest .warns (DeprecationWarning , match = "agent only supports" ):
445+ try :
446+ e = elasticapm .Client ()
447+ finally :
448+ if e :
449+ e .close ()
456450
457451
458452def test_recording (elasticapm_client ):
0 commit comments