@pytest.fixture(autouse=True, scope='session')
def translations_directory(request):
 from django.conf import settings
 settings.POOTLE_TRANSLATION_DIRECTORY = tempfile.mkdtemp()
 def rm_tmp_dir():
  shutil.rmtree(settings.POOTLE_TRANSLATION_DIRECTORY)
 request.addfinalizer(rm_tmp_dir)

@ pytest . fixture ( autouse = True , scope = 'session' ) def translations_directory ( request ) : from django . conf import settings settings . POOTLE_TRANSLATION_DIRECTORY = tempfile . mkdtemp ( ) def rm_tmp_dir ( ) : shutil . rmtree ( settings . POOTLE_TRANSLATION_DIRECTORY ) request . addfinalizer ( rm_tmp_dir )
used by pootleenv .