Skip to content

Commit

Permalink
Track code coverage (#24)
Browse files Browse the repository at this point in the history
* Track code coverage

* Update
  • Loading branch information
florimondmanca committed Jan 17, 2022
1 parent 21bd785 commit cffab25
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[run]
omit = server/migrations/*
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ venv
__pycache__
.pytest_cache
.mypy_cache
.coverage

# GraphViz
*.dot
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ mypy==0.910
psycopg2-binary==2.9.2
pytest==6.2.5
pytest-asyncio==0.16.0
pytest-cov==3.0.0
sqlalchemy-utils==0.37.9
6 changes: 3 additions & 3 deletions server/domain/auth/repositories.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

class UserRepository(Repository):
async def get_by_email(self, email: str) -> Optional[User]:
raise NotImplementedError
raise NotImplementedError # pragma: no cover

async def insert(self, entity: User) -> ID:
raise NotImplementedError
raise NotImplementedError # pragma: no cover

async def delete(self, id: ID) -> None:
raise NotImplementedError
raise NotImplementedError # pragma: no cover
8 changes: 4 additions & 4 deletions server/domain/datasets/repositories.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@

class DatasetRepository(Repository):
async def get_all(self) -> List[Dataset]:
raise NotImplementedError
raise NotImplementedError # pragma: no cover

async def get_by_id(self, id: ID) -> Optional[Dataset]:
raise NotImplementedError
raise NotImplementedError # pragma: no cover

async def insert(self, entity: Dataset) -> ID:
raise NotImplementedError
raise NotImplementedError # pragma: no cover

async def delete(self, id: ID) -> None:
raise NotImplementedError
raise NotImplementedError # pragma: no cover
5 changes: 5 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,10 @@ profile = black
testpaths = tests
addopts =
-rxXs
--cov=server
--cov=tests
--cov-report=term-missing
--cov-config=.coveragerc
--cov-fail-under=90
filterwarnings =
ignore:Calling URL\(\) directly is deprecated:DeprecationWarning

0 comments on commit cffab25

Please sign in to comment.