From 5aa17a3d48bece2257324ebd5cb0979fd02b4a18 Mon Sep 17 00:00:00 2001 From: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com> Date: Tue, 16 Sep 2025 22:45:04 -0700 Subject: [PATCH] Small settings update for test discovery in VS Code --- python/.vscode/settings.json | 9 ++++++++- python/packages/main/pyproject.toml | 10 +++++++++- python/pytest.ini | 9 +++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 python/pytest.ini diff --git a/python/.vscode/settings.json b/python/.vscode/settings.json index 181b926ac0..841014e7b4 100644 --- a/python/.vscode/settings.json +++ b/python/.vscode/settings.json @@ -35,5 +35,12 @@ "name": "azure", "depth": 2 } - ] + ], + "python.testing.pytestEnabled": true, + "python.testing.unittestEnabled": false, + "python.testing.pytestArgs": [ + "packages" + ], + "python.testing.cwd": "${workspaceFolder}", + "python.testing.autoTestDiscoverOnSaveEnabled": true } diff --git a/python/packages/main/pyproject.toml b/python/packages/main/pyproject.toml index 24eec9eee5..fe422ae882 100644 --- a/python/packages/main/pyproject.toml +++ b/python/packages/main/pyproject.toml @@ -72,7 +72,15 @@ environments = [ fallback-version = "0.0.0" [tool.pytest.ini_options] -testpaths = 'tests' +testpaths = [ + 'tests', + 'packages/main/tests', + 'packages/azure/tests', + 'packages/foundry/tests', + 'packages/copilotstudio/tests', + 'packages/mem0/tests', + 'packages/runtime/tests' +] addopts = "-ra -q -r fEX" asyncio_mode = "auto" asyncio_default_fixture_loop_scope = "function" diff --git a/python/pytest.ini b/python/pytest.ini new file mode 100644 index 0000000000..5b3e31cdaa --- /dev/null +++ b/python/pytest.ini @@ -0,0 +1,9 @@ +[pytest] +testpaths = packages/main/tests packages/azure/tests packages/foundry/tests packages/copilotstudio/tests packages/mem0/tests packages/runtime/tests +python_files = test_*.py *_test.py +python_classes = Test* +python_functions = test_* +addopts = -ra -q -r fEX --tb=short +asyncio_mode = auto +asyncio_default_fixture_loop_scope = function +timeout = 120 \ No newline at end of file