def test_flake8_compliance(cookies):
 result = cookies.bake()
 try:
  sh.flake8(str(result.project))
 except sh.ErrorReturnCode as e:
  pytest.fail(e)

def test_flake8_compliance ( cookies ) : result = cookies . bake ( ) try : sh . flake8 ( str ( result . project ) ) except sh . ErrorReturnCode as e : pytest . fail ( e )
generated project should pass flake8 .