Home Testing
Post
Cancel

Testing

Suppress warning

  • pep8 : # noqa

  • pylint : # pylint: disable = line-too-long

PyTest 사용시 테스트 코드 전에 코드를 실행하고 싶을때

1
2
3
4
    @app.on_event("startup")
    async def startup_event():
        await get_database().connect()
        await init_db()

Fixture

link

This post is licensed under CC BY 4.0 by the author.

Trending Tags