diff --git a/Makefile b/Makefile index 92ebc84..43afa03 100644 --- a/Makefile +++ b/Makefile @@ -27,4 +27,8 @@ lint: ## Run pep8, black, mypy linters. .PHONY: test test: ## Run pytest primarily. - pytest \ No newline at end of file + pytest + +.PHONY: coverage +coverage: + coverage run -m pytest \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 926c624..ab1b3b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,6 +41,7 @@ dev = [ "pyright >= 1.1.325", "pytest >= 7.4.0", "mypy >= 1.0.0", + "coverage[toml] >= 7.3", ] [tool.setuptools_scm] @@ -69,3 +70,7 @@ useLibraryCodeForTypes = true pythonVersion = "3.10" pythonPlatform = "Linux" include = ["sqlelf", "tests"] + +[tool.coverage.run] +omit = ["sqlelf/_version.py", "sqlelf/**/__init__.py", "tests/**/__init__.py"] +branch = true