<s> import fnmatch <EOL> import os <EOL> from subprocess import call <EOL> from raven . utils . testutils import BaseTestCase as TestCase <EOL> ROOT = os . path . normpath ( <EOL> os . path . join ( os . path . dirname ( __file__ ) , os . pardir , os . pardir , '<STR_LIT>' ) ) <EOL> def find_files ( root , pattern = '<STR_LIT:*>' ) : <EOL> matches = [ ] <EOL> for root , _ , filenames in os . walk ( root ) : <EOL> for filename in fnmatch . filter ( filenames , pattern ) : <EOL> matches . append ( os . path . join ( root , filename ) ) <EOL> return matches <EOL> class FutureImportsTest ( TestCase ) : <EOL> def test_absolute_import ( self ) : <EOL> string = '<STR_LIT>' <EOL> kwargs = { <EOL> '<STR_LIT>' : open ( '<STR_LIT>' , '<STR_LIT:a>' ) , <EOL> '<STR_LIT>' : open ( '<STR_LIT>' , '<STR_LIT:a>' ) , <EOL> } <EOL> for filename in find_files ( ROOT , '<STR_LIT>' ) : <EOL> assert not call ( [ '<STR_LIT>' , string , filename ] , ** kwargs ) , "<STR_LIT>" % ( string , filename [ len ( ROOT ) - <NUM_LIT:5> : ] ) </s>
