#NEWLINE# def test_dupefilter_path( self ) : #NEWLINE# #INDENT# r1 = Request ( 'http://scrapytest.org/1' ) #NEWLINE# r2 = Request ( 'http://scrapytest.org/2' ) #NEWLINE# path = tempfile . mkdtemp ( ) #NEWLINE# try : #NEWLINE# #INDENT# df = RFPDupeFilter ( path ) #NEWLINE# df . open ( ) #NEWLINE# assert ( not df . request_seen ( r1 ) ) #NEWLINE# assert df . request_seen ( r1 ) #NEWLINE# df . close ( 'finished' ) #NEWLINE# df2 = RFPDupeFilter ( path ) #NEWLINE# df2 . open ( ) #NEWLINE# assert df2 . request_seen ( r1 ) #NEWLINE# assert ( not df2 . request_seen ( r2 ) ) #NEWLINE# assert df2 . request_seen ( r2 ) #NEWLINE# df2 . close ( 'finished' ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# shutil . rmtree ( path )