File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff 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+
204247def _test_download_only_multiple (env ):
205248 pypi = _parse_modules (
206249 env ,
You can’t perform that action at this time.
0 commit comments