From c6d63cc62b6d0823adf1fde1d3b2a18f07063b40 Mon Sep 17 00:00:00 2001 From: Mantas Date: Sun, 17 Nov 2019 16:26:53 +0200 Subject: [PATCH 1/4] Add pytest-cov Also added coverage report in .travis.yml file. --- .coveragerc | 3 +++ .travis.yml | 2 +- requirements.txt | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 000000000000..b43314511ed1 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,3 @@ +[report] +omit = + .env/* diff --git a/.travis.yml b/.travis.yml index 6884d9addba0..6852b84915f9 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/requirements.txt b/requirements.txt index 824f534a245f..1f4b11fc3ea5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,6 +9,7 @@ opencv-python pandas pillow pytest +pytest-cov requests scikit-fuzzy sklearn From 1d0bf71051a7e24d8d85b510f9d2281db13af373 Mon Sep 17 00:00:00 2001 From: github-actions <${GITHUB_ACTOR}@users.noreply.github.com> Date: Sun, 17 Nov 2019 14:27:23 +0000 Subject: [PATCH 2/4] updating DIRECTORY.md --- DIRECTORY.md | 1 + 1 file changed, 1 insertion(+) diff --git a/DIRECTORY.md b/DIRECTORY.md index 15a906332d22..6e64f034df62 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) From 7cd836b442d2373f36e942e8fbb1447256c5784c Mon Sep 17 00:00:00 2001 From: Mantas Date: Sun, 17 Nov 2019 17:53:30 +0200 Subject: [PATCH 3/4] Sort by missing statements --- .coveragerc | 1 + 1 file changed, 1 insertion(+) diff --git a/.coveragerc b/.coveragerc index b43314511ed1..417399e15387 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,3 +1,4 @@ [report] +sort = Miss omit = .env/* From 0248cd64ff1faf0ad7838a4866673f2f91f1a64f Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sun, 17 Nov 2019 19:33:42 +0100 Subject: [PATCH 4/4] sort = Cover --- .coveragerc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.coveragerc b/.coveragerc index 417399e15387..f7e6eb212bc8 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,4 +1,4 @@ [report] -sort = Miss +sort = Cover omit = .env/*