From a733dc838dfdcb5ab94a226187e53081406238ef Mon Sep 17 00:00:00 2001 From: Max Lapan Date: Fri, 16 Feb 2024 12:45:42 +0100 Subject: [PATCH] Coverage and pytest --- .gitignore | 2 ++ Makefile | 5 +++++ pycov.ini | 3 +++ pytest.ini | 4 ++++ 4 files changed, 14 insertions(+) create mode 100644 Makefile create mode 100644 pycov.ini create mode 100644 pytest.ini diff --git a/.gitignore b/.gitignore index 0ac5c0d..09a0f17 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,5 @@ dist build .swp .ipynb_checkpoints +htmlcov +.coverage \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c4d92f8 --- /dev/null +++ b/Makefile @@ -0,0 +1,5 @@ +pytest: + pytest + +cov: + open htmlcov/index.html diff --git a/pycov.ini b/pycov.ini new file mode 100644 index 0000000..fe23f64 --- /dev/null +++ b/pycov.ini @@ -0,0 +1,3 @@ +[run] +source = + ptan \ No newline at end of file diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000..d61c5cb --- /dev/null +++ b/pytest.ini @@ -0,0 +1,4 @@ +[pytest] +testpaths=**/tests_py +pythonpath=ptan +addopts= --cov --cov-config=pycov.ini --cov-report=term --cov-report=html