0

PytestCollectionWarning: cannot collect 'test_app' because it is not a function. async def call(

Here test_app is an isnatance of quart app:

# Create the Quart app
test_app = app.create_app()

def event_runner():

    policy = asyncio.get_event_loop_policy()
    loop = policy.new_event_loop()

    yield loop
    loop.close()

I tried seeting flad test= flase for test_app.

ChrisGPT was on strike
  • 127,765
  • 105
  • 273
  • 257
Harish
  • 1
  • I fixed your code block and started to fix typos, but there are a _lot_ of them and I'm not sure what you intend to say in all cases. Please [edit] your question and try to fix them. Clarity and detail are important. – ChrisGPT was on strike Aug 27 '23 at 13:12
  • `pytest` collects everything that starts with `test_`, including `test_app`. You might want to rename it to something such as `app_under_test` to see if the error goes away. – Hai Vu Aug 27 '23 at 15:46

0 Answers0