WIP: Add comprehensive unit test suite (73 tests) #19
No reviewers
Labels
No labels
CI/CD
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
tests
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
AndreFerreira5/downtown-cab-co!19
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "copilot/add-unit-tests"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
@copilot the actions did not pass with the following output, fix it:
Run uv run pytest
============================= test session starts ==============================
platform linux -- Python 3.13.9, pytest-8.4.2, pluggy-1.6.0 -- /home/runner/work/downtown-cab-co/downtown-cab-co/.venv/bin/python
cachedir: .pytest_cache
rootdir: /home/runner/work/downtown-cab-co/downtown-cab-co
configfile: pytest.ini
testpaths: tests
plugins: anyio-4.11.0, hydra-core-1.3.2
collecting ... collected 47 items / 2 errors
==================================== ERRORS ====================================
______________ ERROR collecting tests/inference_api/test_main.py _______________
.venv/lib/python3.13/site-packages/starlette/testclient.py:44: in
import httpx
E ModuleNotFoundError: No module named 'httpx'
During handling of the above exception, another exception occurred:
tests/inference_api/test_main.py:5: in
from fastapi.testclient import TestClient
.venv/lib/python3.13/site-packages/fastapi/testclient.py:1: in
from starlette.testclient import TestClient as TestClient # noqa
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.13/site-packages/starlette/testclient.py:46: in
raise RuntimeError(
E RuntimeError: The starlette.testclient module requires the httpx package to be installed.
E You can install this with:
E $ pip install httpx
_______________ ERROR collecting tests/training_api/test_main.py _______________
.venv/lib/python3.13/site-packages/starlette/testclient.py:44: in
import httpx
E ModuleNotFoundError: No module named 'httpx'
During handling of the above exception, another exception occurred:
tests/training_api/test_main.py:5: in
from fastapi.testclient import TestClient
.venv/lib/python3.13/site-packages/fastapi/testclient.py:1: in
from starlette.testclient import TestClient as TestClient # noqa
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.13/site-packages/starlette/testclient.py:46: in
raise RuntimeError(
E RuntimeError: The starlette.testclient module requires the httpx package to be installed.
E You can install this with:
E $ pip install httpx
=========================== short test summary info ============================
ERROR tests/inference_api/test_main.py - RuntimeError: The starlette.testclient module requires the httpx package to be installed.
You can install this with:
$ pip install httpx
ERROR tests/training_api/test_main.py - RuntimeError: The starlette.testclient module requires the httpx package to be installed.
You can install this with:
$ pip install httpx
!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!
============================== 2 errors in 5.34s ===============================
Error: Process completed with exit code 2.
Fixed in
df1c2f5. The issue was thatinference_apiis a workspace member and should be imported asinference_apinotsrc.inference_api. Updated all imports in the inference API tests to use the correct package name.stale PR superseeded by #23
closing
Pull request closed