|
15 | 15 | "" |
16 | 16 |
|
17 | 17 | load("@rules_testing//lib:test_suite.bzl", "test_suite") |
| 18 | +load("//python/private/pypi:pypi_cache.bzl", "pypi_cache") # buildifier: disable=bzl-visibility |
18 | 19 | load("//python/private/pypi:simpleapi_download.bzl", "simpleapi_download", "strip_empty_path_segments") # buildifier: disable=bzl-visibility |
19 | 20 |
|
20 | 21 | _tests = [] |
@@ -52,7 +53,7 @@ def _test_simple(env): |
52 | 53 | sources = ["foo", "bar", "baz"], |
53 | 54 | envsubst = [], |
54 | 55 | ), |
55 | | - cache = {}, |
| 56 | + cache = pypi_cache(), |
56 | 57 | parallel_download = True, |
57 | 58 | read_simpleapi = read_simpleapi, |
58 | 59 | ) |
@@ -112,7 +113,7 @@ def _test_fail(env): |
112 | 113 | sources = ["foo", "bar", "baz"], |
113 | 114 | envsubst = [], |
114 | 115 | ), |
115 | | - cache = {}, |
| 116 | + cache = pypi_cache(), |
116 | 117 | parallel_download = True, |
117 | 118 | read_simpleapi = read_simpleapi, |
118 | 119 | _fail = fails.append, |
@@ -165,7 +166,7 @@ def _test_download_url(env): |
165 | 166 | sources = ["foo", "bar", "baz"], |
166 | 167 | envsubst = [], |
167 | 168 | ), |
168 | | - cache = {}, |
| 169 | + cache = pypi_cache(), |
169 | 170 | parallel_download = False, |
170 | 171 | get_auth = lambda ctx, urls, ctx_attr: struct(), |
171 | 172 | ) |
@@ -201,7 +202,7 @@ def _test_download_url_parallel(env): |
201 | 202 | sources = ["foo", "bar", "baz"], |
202 | 203 | envsubst = [], |
203 | 204 | ), |
204 | | - cache = {}, |
| 205 | + cache = pypi_cache(), |
205 | 206 | parallel_download = True, |
206 | 207 | get_auth = lambda ctx, urls, ctx_attr: struct(), |
207 | 208 | ) |
@@ -237,7 +238,7 @@ def _test_download_envsubst_url(env): |
237 | 238 | sources = ["foo", "bar", "baz"], |
238 | 239 | envsubst = ["INDEX_URL"], |
239 | 240 | ), |
240 | | - cache = {}, |
| 241 | + cache = pypi_cache(), |
241 | 242 | parallel_download = False, |
242 | 243 | get_auth = lambda ctx, urls, ctx_attr: struct(), |
243 | 244 | ) |
|
0 commit comments