Skip to content

Commit 3f75010

Browse files
committed
add test
1 parent 2a42cc8 commit 3f75010

2 files changed

Lines changed: 27 additions & 0 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#
2+
# This file is autogenerated by poetry with Python 3.11
3+
# by the following command:
4+
#
5+
# poetry export -f requirements.txt --output requirements/tmp.txt
6+
#
7+
8+
packaging==24.0 ; python_version >= "3.8" and python_version < "4.0" \
9+
--hash=sha256:2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5 \
10+
--hash=sha256:eb82c5e3e56209074766e6885bb04b8c38a0c015d0a30036ebe7ece34c9989e9
11+
toskip==0.0.1 ; python_version >= "3.8" and python_version < "3.10" \
12+
--hash=sha256:2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5

tests/test_get_deps.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,18 @@ def test_doGetReqs_requirements() -> None:
7575
"XARRAY" not in deps
7676
) # xarray is an optional dependency of pandas associated with 'computation' key that is not
7777
# tracked in test_requirements.txt
78+
79+
def test_doGetReqs_requirements_with_hashes() -> None:
80+
using = "requirements"
81+
extras = []
82+
pyproject = {}
83+
requirementsPaths = [Path(f"{THISDIR}/data/test_requirements_hash.txt")]
84+
skipDependencies = [types.ucstr("TOSKIP")]
85+
86+
deps = get_deps.do_get_reqs(using, skipDependencies, extras, pyproject, requirementsPaths)
87+
assert deps == {
88+
"PACKAGING"
89+
}
90+
assert (
91+
"TOSKIP" not in deps
92+
)

0 commit comments

Comments
 (0)