Skip to content

Commit d3daaed

Browse files
committed
Add an initial test to cover search_packages_info
1 parent 1268e7a commit d3daaed

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ jobs:
3737
3838
- name: "Run tests"
3939
run: |
40-
# We currently require 96% test coverage and not 100% as this is the
40+
# We currently require 99% test coverage and not 100% as this is the
4141
# level that coverage was at when the CI restriction was introduced.
42-
pytest -s -vvv --cov-fail-under 96 --cov=pip_check_reqs/ --cov=tests tests/ --cov-report=xml
42+
pytest -s -vvv --cov-fail-under 99 --cov=pip_check_reqs/ --cov=tests tests/ --cov-report=xml
4343
4444
- name: "Upload coverage to Codecov"
4545
uses: "codecov/codecov-action@v1"

tests/test_common.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,3 +179,12 @@ def ignore_reqs(req):
179179

180180
reqs = common.find_required_modules(options)
181181
assert reqs == set(['foobar'])
182+
183+
184+
def test_search_packages_info():
185+
# We know that 'packaging' will be installed because it is a requirement of
186+
# this package.
187+
installed_package = 'packaging'
188+
query = ('packaging', )
189+
[result] = [item for item in common.search_packages_info(query=query)]
190+
assert result['name'] == installed_package

0 commit comments

Comments
 (0)