#NEWLINE# def test_query_cancel( self ) : #NEWLINE# #INDENT# f = self . resolver . query ( 'google.com' , 'A' ) #NEWLINE# self . resolver . cancel ( ) #NEWLINE# try : #NEWLINE# #INDENT# self . loop . run_until_complete ( f ) #NEWLINE# #UNINDENT# except aiodns . error . DNSError as e : #NEWLINE# #INDENT# self . assertEqual ( e . args [ 0 ] , aiodns . error . ARES_ECANCELLED )