Skip to content

Commit 6b0d153

Browse files
authored
Use yarl instead of grpcio in tests to avoid dependabot warnings (#37)
1 parent 31a6241 commit 6b0d153

File tree

8 files changed

+40
-18
lines changed

8 files changed

+40
-18
lines changed

NOTICE-3RD-PARTY-CONTENT.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Python
44
| Dependency | Version | License |
55
|:-----------|:-------:|--------:|
6-
|certifi|2024.6.2|Mozilla Public License 2.0|
6+
|certifi|2024.7.4|Mozilla Public License 2.0|
77
|charset-normalizer|3.3.2|MIT|
88
|gitdb|4.0.11|BSD|
99
|GitPython|3.1.43|New BSD|
@@ -12,9 +12,9 @@
1212
|requests|2.32.3|Apache 2.0|
1313
|smmap|5.0.1|BSD|
1414
|str2bool|1.1|BSD|
15-
|types-PyYAML|6.0.12.20240311|Apache 2.0|
16-
|types-requests|2.32.0.20240622|Apache 2.0|
17-
|types-setuptools|70.1.0.20240625|Apache 2.0|
15+
|types-PyYAML|6.0.12.20240724|Apache 2.0|
16+
|types-requests|2.32.0.20240712|Apache 2.0|
17+
|types-setuptools|71.1.0.20240726|Apache 2.0|
1818
|urllib3|2.2.2|MIT|
1919
## Workflows
2020
| Dependency | Version | License |

test/lib/test_licensefinder.py

+21-7
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,24 @@ def test_execution_python():
2525
pip_requirements_path="requirements.txt",
2626
)
2727

28-
assert len(result) == 2
29-
assert result[0].name == "grpcio"
30-
assert result[0].version == "1.53.0"
31-
assert result[0].licenses == ["Apache 2.0"]
32-
assert result[1].name == "six"
33-
assert result[1].version == "1.16.0"
34-
assert result[1].licenses == ["MIT"]
28+
# Two explicit plus two implicit
29+
assert len(result) == 4
30+
31+
# List in alphabetical order
32+
# idna required by yarl
33+
assert result[0].name == "idna"
34+
assert result[0].version == "3.7"
35+
assert result[0].licenses == ["BSD"]
36+
37+
# multidict required by yarl
38+
assert result[1].name == "multidict"
39+
assert result[1].version == "6.0.5"
40+
assert result[1].licenses == ["Apache 2.0"]
41+
42+
assert result[2].name == "six"
43+
assert result[2].version == "1.16.0"
44+
assert result[2].licenses == ["MIT"]
45+
46+
assert result[3].name == "yarl"
47+
assert result[3].version == "1.9.4"
48+
assert result[3].licenses == ["Apache 2.0"]

test/test_licensevalidator.py

+10-4
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,11 @@ def test_python_with_workflows():
3636

3737
assert "Python" in origin_vs_deps
3838
python_deps = origin_vs_deps["Python"]
39-
assert python_deps[0].name == "grpcio"
40-
assert python_deps[1].name == "six"
39+
assert len(python_deps) == 4
40+
assert python_deps[0].name == "idna"
41+
assert python_deps[1].name == "multidict"
42+
assert python_deps[2].name == "six"
43+
assert python_deps[3].name == "yarl"
4144

4245
assert "Workflows" in origin_vs_deps
4346
workflow_deps = origin_vs_deps["Workflows"]
@@ -61,8 +64,11 @@ def test_python_without_workflows():
6164
assert len(origin_vs_deps) == 1
6265
assert "Python" in origin_vs_deps
6366
python_deps = origin_vs_deps["Python"]
64-
assert python_deps[0].name == "grpcio"
65-
assert python_deps[1].name == "six"
67+
assert len(python_deps) == 4
68+
assert python_deps[0].name == "idna"
69+
assert python_deps[1].name == "multidict"
70+
assert python_deps[2].name == "six"
71+
assert python_deps[3].name == "yarl"
6672

6773

6874
def test_python_without_req_files():
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
grpcio==1.53.0
1+
yarl==1.9.4
22
coverage2clover
33
coveragepy-lcov
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
grpcio==1.53.0
1+
yarl==1.9.4
22
six==1.16.0
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
Apache 2.0
22
MIT
3+
BSD
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
grpcio==1.53.0
1+
yarl==1.9.4
22
six==1.16.0
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
Apache 2.0
22
MIT
3+
BSD

0 commit comments

Comments
 (0)