Move tests to their own folder
This commit is contained in:
@ -33,7 +33,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Run tests with coverage
|
- name: Run tests with coverage
|
||||||
run: |
|
run: |
|
||||||
pytest --cov=./ --cov-report=term --cov-report=xml --cov-report=html --junitxml=report.xml app
|
pytest --cov=./ --cov-report=term --cov-report=xml --cov-report=html --junitxml=report.xml tests
|
||||||
|
|
||||||
- name: Upload coverage artifacts
|
- name: Upload coverage artifacts
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
|
|||||||
2
tests/pytest.ini
Normal file
2
tests/pytest.ini
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[pytest]
|
||||||
|
pythonpath = ../app
|
||||||
@ -9,7 +9,7 @@ from operator import itemgetter
|
|||||||
from faker import Faker
|
from faker import Faker
|
||||||
from fastapi.testclient import TestClient
|
from fastapi.testclient import TestClient
|
||||||
|
|
||||||
from .main import app
|
from main import app
|
||||||
|
|
||||||
# Set up logging
|
# Set up logging
|
||||||
logging.basicConfig(level=logging.INFO)
|
logging.basicConfig(level=logging.INFO)
|
||||||
Reference in New Issue
Block a user