@pytest.fixture
def project_dir(request):
 rendered_dir = 'fake-project-templated'
 def remove_generated_project():
  if os.path.isdir(rendered_dir):
   utils.rmtree(rendered_dir)
 request.addfinalizer(remove_generated_project)
 return rendered_dir

@ pytest . fixture def project_dir ( request ) : rendered_dir = 'fake-project-templated' def remove_generated_project ( ) : if os . path . isdir ( rendered_dir ) : utils . rmtree ( rendered_dir ) request . addfinalizer ( remove_generated_project ) return rendered_dir
remove the rendered project directory created by the test .