openai/openai-python
Publicmirrored fromhttps://github.com/openai/openai-pythonAvailable
tests/conftest.py
16lines · modecode
| 1 | import asyncio |
| 2 | import logging |
| 3 | from typing import Iterator |
| 4 | |
| 5 | import pytest |
| 6 | |
| 7 | pytest.register_assert_rewrite("tests.utils") |
| 8 | |
| 9 | logging.getLogger("openai").setLevel(logging.DEBUG) |
| 10 | |
| 11 | |
| 12 | @pytest.fixture(scope="session") |
| 13 | def event_loop() -> Iterator[asyncio.AbstractEventLoop]: |
| 14 | loop = asyncio.new_event_loop() |
| 15 | yield loop |
| 16 | loop.close() |
| 17 | |