From cf61a86e0a7c30b521b2bc07104a4b116cce9e19 Mon Sep 17 00:00:00 2001 From: Mikalai Saskavets Date: Thu, 29 Oct 2020 22:42:13 +0300 Subject: [PATCH] Add coverage lib and config for it Here is unittest, but we can switch to pytest in the future... --- .coveragerc | 4 ++++ Makefile | 4 ++++ requirements-dev.txt | 1 + 3 files changed, 9 insertions(+) create mode 100644 .coveragerc create mode 100644 Makefile diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..5951051 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,4 @@ +[report] + +exclude_lines = + if __name__ == .__main__.: \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9e11785 --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +test: + PYTHONPATH=. coverage run -m unittest discover -s test + coverage report -m + flake8 diff --git a/requirements-dev.txt b/requirements-dev.txt index 3930480..56236c7 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1 +1,2 @@ flake8 +coverage>=5.3,<5.4