mirror of
https://github.com/microsoft/autogen.git
synced 2025-08-01 13:22:33 +00:00

* --skip-openai * All tests pass * Update build.yml * Update Contribute.md * Fix for failing Ubuntu tests * More tests skipped, fixing 3.10 build * Apply suggestions from code review Co-authored-by: Qingyun Wu <qingyun0327@gmail.com> * Added more comments * fixed test__wrap_function_* --------- Co-authored-by: Qingyun Wu <qingyun0327@gmail.com> Co-authored-by: Davor Runje <davor@airt.ai>
17 lines
567 B
Python
17 lines
567 B
Python
import pytest
|
|
|
|
skip_openai = False
|
|
|
|
|
|
# Registers command-line option '--skip-openai' via pytest hook.
|
|
# When this flag is set, it indicates that tests requiring OpenAI should be skipped.
|
|
def pytest_addoption(parser):
|
|
parser.addoption("--skip-openai", action="store_true", help="Skip all tests that require openai")
|
|
|
|
|
|
# pytest hook implementation extracting the '--skip-openai' command line arg and exposing it globally
|
|
@pytest.hookimpl(tryfirst=True)
|
|
def pytest_configure(config):
|
|
global skip_openai
|
|
skip_openai = config.getoption("--skip-openai", False)
|