Skip to content

Commit ff5b449

Browse files
committed
fix tests
1 parent 0897033 commit ff5b449

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

python/private/pypi/parse_requirements.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def parse_requirements(
159159
get_index_urls = None,
160160
python_version = None,
161161
logger = None,
162-
evaluate_markers = {}.get,
162+
evaluate_markers = lambda _: {},
163163
fail_fn = fail):
164164
"""Get the requirements with platforms that the requirements apply to.
165165

tests/pypi/parse_requirements/parse_requirements_tests.bzl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ foo==0.0.1 --hash=sha256:deadbeef
3434
foo[extra]==0.0.1 --hash=sha256:deadbeef
3535
""",
3636
"requirements_marker": """\
37-
foo[extra]==0.0.1; marker --hash=sha256:deadbeef
37+
foo[extra]==0.0.1 ;marker --hash=sha256:deadbeef
3838
bar==0.0.1 --hash=sha256:deadbeef
3939
""",
4040
"requirements_osx": """\
@@ -441,7 +441,7 @@ _tests.append(_test_os_arch_requirements_with_default)
441441
def _test_env_marker_resolution(env):
442442
def _mock_eval_markers(input):
443443
ret = {
444-
"foo[extra]==0.0.1; marker --hash=sha256:deadbeef": ["cp311_windows_x86_64"],
444+
"foo[extra]==0.0.1 ;marker --hash=sha256:deadbeef": ["cp311_windows_x86_64"],
445445
}
446446

447447
env.expect.that_collection(input.keys()).contains_exactly(ret.keys())
@@ -481,10 +481,10 @@ def _test_env_marker_resolution(env):
481481
extra_pip_args = [],
482482
# This is not exposed because we also have `linux_super_exotic` in the platform list
483483
is_exposed = False,
484-
requirement_line = "foo[extra]==0.0.1; marker --hash=sha256:deadbeef",
484+
requirement_line = "foo[extra]==0.0.1 ;marker --hash=sha256:deadbeef",
485485
sdist = None,
486486
srcs = struct(
487-
requirement = "foo[extra]==0.0.1; marker",
487+
requirement = "foo[extra]==0.0.1 ;marker",
488488
shas = ["deadbeef"],
489489
version = "0.0.1",
490490
),

0 commit comments

Comments
 (0)