#NEWLINE# @ pytest . yield_fixture ( autouse = True ) #NEWLINE# def setup_mocks_and_config_watcher( self ) : #NEWLINE# #INDENT# self . loader = mock . Mock ( ) #NEWLINE# with mock . patch ( 'staticconf.config.time' ) as self . mock_time : #NEWLINE# #INDENT# with mock . patch ( 'staticconf.config.os.stat' ) as self . mock_stat : #NEWLINE# #INDENT# with tempfile . NamedTemporaryFile ( ) as file : #NEWLINE# #INDENT# with mock . patch ( 'staticconf.config.os.path' ) as self . mock_path : #NEWLINE# #INDENT# file . flush ( ) #NEWLINE# self . mock_stat . return_value . st_ino = 1 #NEWLINE# self . mock_stat . return_value . st_dev = 2 #NEWLINE# self . filename = file . name #NEWLINE# self . watcher = config . ConfigurationWatcher ( self . loader , file . filename ) #NEWLINE# ( yield )