Skip to content

Commit ba6518c

Browse files
committed
bring back a single test
1 parent ea0cc1f commit ba6518c

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

tests/pypi/extension/extension_tests.bzl

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,49 @@ def _parse(
201201
**kwargs
202202
)
203203

204+
def _test_simple(env):
205+
pypi = _parse_modules(
206+
env,
207+
module_ctx = _mock_mctx(
208+
_mod(
209+
name = "rules_python",
210+
parse = [
211+
_parse(
212+
hub_name = "pypi",
213+
python_version = "3.15",
214+
requirements_lock = "requirements.txt",
215+
),
216+
],
217+
),
218+
),
219+
available_interpreters = {
220+
"python_3_15_host": "unit_test_interpreter_target",
221+
},
222+
minor_mapping = {"3.15": "3.15.19"},
223+
)
224+
225+
pypi.exposed_packages().contains_exactly({"pypi": ["simple"]})
226+
pypi.hub_group_map().contains_exactly({"pypi": {}})
227+
pypi.hub_whl_map().contains_exactly({"pypi": {
228+
"simple": {
229+
"pypi_315_simple": [
230+
whl_config_setting(
231+
version = "3.15",
232+
),
233+
],
234+
},
235+
}})
236+
pypi.whl_libraries().contains_exactly({
237+
"pypi_315_simple": {
238+
"dep_template": "@pypi//{name}:{target}",
239+
"python_interpreter_target": "unit_test_interpreter_target",
240+
"requirement": "simple==0.0.1 --hash=sha256:deadbeef --hash=sha256:deadbaaf",
241+
},
242+
})
243+
pypi.whl_mods().contains_exactly({})
244+
245+
_tests.append(_test_simple)
246+
204247
def _test_download_only_multiple(env):
205248
pypi = _parse_modules(
206249
env,

0 commit comments

Comments
 (0)