From 5616fa9e62a7fc85f2e195db55ee086b687cbb48 Mon Sep 17 00:00:00 2001 From: Mantas Zimnickas Date: Sun, 17 Nov 2019 20:37:58 +0200 Subject: [PATCH] Add pytest-cov (#1578) * Add pytest-cov Also added coverage report in .travis.yml file. * updating DIRECTORY.md * Sort by missing statements * sort = Cover --- .coveragerc | 4 ++++ .travis.yml | 2 +- DIRECTORY.md | 1 + requirements.txt | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 000000000..f7e6eb212 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,4 @@ +[report] +sort = Cover +omit = + .env/* diff --git a/.travis.yml b/.travis.yml index 6884d9add..6852b8491 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,6 @@ before_script: script: - scripts/validate_filenames.py # no uppercase, no spaces, in a directory - mypy --ignore-missing-imports . - - pytest . --doctest-modules + - pytest --doctest-modules --cov-report=term-missing:skip-covered --cov=. . after_success: - scripts/build_directory_md.py 2>&1 | tee DIRECTORY.md diff --git a/DIRECTORY.md b/DIRECTORY.md index 15a906332..6e64f034d 100644 --- a/DIRECTORY.md +++ b/DIRECTORY.md @@ -521,6 +521,7 @@ * [Naive String Search](https://github.com/TheAlgorithms/Python/blob/master/strings/naive_string_search.py) * [Rabin Karp](https://github.com/TheAlgorithms/Python/blob/master/strings/rabin_karp.py) * [Remove Duplicate](https://github.com/TheAlgorithms/Python/blob/master/strings/remove_duplicate.py) + * [Word Occurence](https://github.com/TheAlgorithms/Python/blob/master/strings/word_occurence.py) ## Traversals * [Binary Tree Traversals](https://github.com/TheAlgorithms/Python/blob/master/traversals/binary_tree_traversals.py) diff --git a/requirements.txt b/requirements.txt index 824f534a2..1f4b11fc3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,6 +9,7 @@ opencv-python pandas pillow pytest +pytest-cov requests scikit-fuzzy sklearn