@pytest.fixture
def filesystem_loader():
 here = os.path.dirname(os.path.abspath(__file__))
 return loaders.FileSystemLoader((here + '/res/templates'))

@ pytest . fixture def filesystem_loader ( ) : here = os . path . dirname ( os . path . abspath ( __file__ ) ) return loaders . FileSystemLoader ( ( here + '/res/templates' ) )
returns filesystemloader initialized to res/templates directory .