Skip to content

Commit 10094f6

Browse files
committed
add tests
1 parent d6c4514 commit 10094f6

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

tests/pypi/pep508/evaluate_tests.bzl

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,18 +68,28 @@ def _evaluate_non_version_env_tests(env):
6868

6969
# When
7070
for input, want in {
71-
"{} == 'osx'".format(var_name): True,
72-
"{} != 'osx'".format(var_name): False,
73-
"'osx' == {}".format(var_name): True,
7471
"'osx' != {}".format(var_name): False,
75-
"'x' in {}".format(var_name): True,
72+
"'osx' < {}".format(var_name): False,
73+
"'osx' <= {}".format(var_name): True,
74+
"'osx' == {}".format(var_name): True,
75+
"'osx' >= {}".format(var_name): True,
7676
"'w' not in {}".format(var_name): True,
77-
}.items(): # buildifier: @unsorted-dict-items
77+
"'x' in {}".format(var_name): True,
78+
"{} != 'osx'".format(var_name): False,
79+
"{} < 'osx'".format(var_name): False,
80+
"{} <= 'osx'".format(var_name): True,
81+
"{} == 'osx'".format(var_name): True,
82+
"{} > 'osx'".format(var_name): False,
83+
"{} >= 'osx'".format(var_name): True,
84+
}.items():
7885
got = evaluate(
7986
input,
8087
env = marker_env,
8188
)
82-
env.expect.that_bool(got).equals(want)
89+
env.expect.where(
90+
expr = input,
91+
env = marker_env,
92+
).that_bool(got).equals(want)
8393

8494
# Check that the non-strict eval gives us back the input when no
8595
# env is supplied.

0 commit comments

Comments
 (0)