lastmile-ai / aiconfig

AIConfig is a config-based framework to build generative AI applications.
https://aiconfig.lastmileai.dev
MIT License
963 stars 79 forks source link

Fix Tests Marked as xfail #1408

Closed rholinshead closed 8 months ago

rholinshead commented 8 months ago

Fix Tests Marked as xfail

Fix Tests Marked as xfail

These were marked as xfail in https://github.com/lastmile-ai/aiconfig/pull/999 as part of the parser refactor. I noticed in https://github.com/openai/openai-python/issues/715#issuecomment-1809203346 that applying the patch to openai.resources.chat.Completions.create seems to fix the tests

Test Plan:

(aiconfig) ryanholinshead@Ryans-MBP python % pytest tests/parsers/test_openai_util.py
========================================================== test session starts ===========================================================
platform darwin -- Python 3.12.1, pytest-7.4.3, pluggy-1.4.0
rootdir: /Users/ryanholinshead/Projects/aiconfig/python
plugins: asyncio-0.23.5, hypothesis-6.91.0, cov-4.1.0, mock-3.12.0, anyio-4.2.0
asyncio: mode=Mode.STRICT
collected 3 items

tests/parsers/test_openai_util.py ...                                                                                              [100%]
===================================================== 3 passed, 10 warnings in 0.50s =====================================================
(aiconfig) ryanholinshead@Ryans-MBP python % pytest tests/test_run_config.py
========================================================== test session starts ===========================================================
platform darwin -- Python 3.12.1, pytest-7.4.3, pluggy-1.4.0
rootdir: /Users/ryanholinshead/Projects/aiconfig/python
plugins: asyncio-0.23.5, hypothesis-6.91.0, cov-4.1.0, mock-3.12.0, anyio-4.2.0
asyncio: mode=Mode.STRICT
collected 1 item

tests/test_run_config.py .
===================================================== 1 passed, 10 warnings in 0.50s =====================================================