Skip to content

Commit 1073796

Browse files
committed
add a test
1 parent 42cd4a7 commit 1073796

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

tests/pypi/extension/extension_tests.bzl

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ _tests = []
2222

2323
def _mock_mctx(*modules, environ = {}, read = None, os_name = "unittest", os_arch = "exotic"):
2424
return struct(
25-
os = os or struct(
25+
os = struct(
2626
environ = environ,
2727
name = os_name,
2828
arch = os_arch,
@@ -183,8 +183,17 @@ def _test_simple_with_whl_mods(env):
183183
pypi.is_reproducible().equals(True)
184184
pypi.exposed_packages().contains_exactly({"pypi": []})
185185
pypi.hub_group_map().contains_exactly({"pypi": {}})
186-
pypi.hub_whl_map().contains_exactly({"pypi": {}})
187-
pypi.whl_libraries().contains_exactly({})
186+
pypi.hub_whl_map().contains_exactly({"pypi": {
187+
"simple": [struct(config_setting = "//_config:is_python_3.15", filename = None, repo = "pypi_315_simple", target_platforms = None, version = "3.15")],
188+
}})
189+
pypi.whl_libraries().contains_exactly({
190+
"pypi_315_simple": {
191+
"dep_template": "@pypi//{name}:{target}",
192+
"python_interpreter_target": "unit_test_interpreter_target",
193+
"repo": "pypi_315",
194+
"requirement": "simple==0.0.1 --hash=sha256:deadbeef",
195+
},
196+
})
188197
pypi.whl_mods().contains_exactly({})
189198

190199
_tests.append(_test_simple_with_whl_mods)

0 commit comments

Comments
 (0)