-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathtest_dependency_version_check.py
More file actions
53 lines (45 loc) · 1.12 KB
/
test_dependency_version_check.py
File metadata and controls
53 lines (45 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
from dependency_version_check import find_earliest_supported_version
def test_is_supported_earliest_version():
def is_supported(version: str) -> bool:
supported_versions = {
"1.1.3",
"3.11.2",
"3.12.4",
"4.5.0",
"4.5.1",
"4.60.200",
"12.0.1",
"101.567.1",
}
return version in supported_versions
versions = {
"1.0.1",
"1.1.2",
"1.1.3",
"3.11.2",
"3.11.3",
"3.12.4",
"4.5.0",
"4.5.1",
"4.60.200",
"12.0.1",
"101.567.1",
}
assert find_earliest_supported_version(versions, is_supported) == "1.1.3"
def test_is_not_supported_earliest_version():
def is_supported(version: str) -> bool:
supported_versions = {}
versions = {
"1.0.1",
"1.1.2",
"1.1.3",
"3.11.2",
"3.11.3",
"3.12.4",
"4.5.0",
"4.5.1",
"4.60.200",
"12.0.1",
"101.567.1",
}
assert find_earliest_supported_version(versions, is_supported) is None