diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index c564208e8..9ec1572c9 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -40,4 +40,4 @@ jobs: - name: Test with pytest run: | pip install pytest - pytest --doctest-modules --ignore-glob="*to_be_updated*" src/dailyai + pytest --doctest-modules --ignore-glob="*to_be_updated*" src tests diff --git a/README.md b/README.md index c8dff3252..dc0c8c042 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,20 @@ If you want to use this package from another directory, you can run: pip install path_to_this_repo ``` +### Running tests + +To run tests you need to install `pytest`: + +``` +pip install pytest +``` + +Then, from the root directory, run: + +``` +pytest --doctest-modules --ignore-glob="*to_be_updated*" src tests +``` + ## Setting up your editor This project uses strict [PEP 8](https://peps.python.org/pep-0008/) formatting. diff --git a/pyproject.toml b/pyproject.toml index d2e61fdbb..e1eac802b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,3 +45,6 @@ Website = "https://daily.co" [tool.setuptools.packages.find] # All the following settings are optional: where = ["src"] + +[tool.pytest.ini_options] +pythonpath = ["src"] diff --git a/src/dailyai/tests/__init__.py b/src/dailyai/tests/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/dailyai/tests/integration/integration_azure_llm.py b/tests/integration/integration_azure_llm.py similarity index 100% rename from src/dailyai/tests/integration/integration_azure_llm.py rename to tests/integration/integration_azure_llm.py diff --git a/src/dailyai/tests/integration/integration_ollama_llm.py b/tests/integration/integration_ollama_llm.py similarity index 100% rename from src/dailyai/tests/integration/integration_ollama_llm.py rename to tests/integration/integration_ollama_llm.py diff --git a/src/dailyai/tests/integration/integration_openai_llm.py b/tests/integration/integration_openai_llm.py similarity index 100% rename from src/dailyai/tests/integration/integration_openai_llm.py rename to tests/integration/integration_openai_llm.py diff --git a/src/dailyai/tests/test_aggregators.py b/tests/test_aggregators.py similarity index 100% rename from src/dailyai/tests/test_aggregators.py rename to tests/test_aggregators.py diff --git a/src/dailyai/tests/test_ai_services.py b/tests/test_ai_services.py similarity index 100% rename from src/dailyai/tests/test_ai_services.py rename to tests/test_ai_services.py diff --git a/src/dailyai/tests/test_daily_transport_service.py b/tests/test_daily_transport_service.py similarity index 100% rename from src/dailyai/tests/test_daily_transport_service.py rename to tests/test_daily_transport_service.py diff --git a/src/dailyai/tests/test_pipeline.py b/tests/test_pipeline.py similarity index 100% rename from src/dailyai/tests/test_pipeline.py rename to tests/test_pipeline.py