Skip to content

Commit 3ce70d4

Browse files
committed
fixup unit tests
1 parent 3b9cdd8 commit 3ce70d4

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

tests/pypi/pep508/deps_tests.bzl

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def test_can_add_os_specific_deps(env):
5858
"win_dep; os_name=='nt'",
5959
],
6060
platforms = target.platforms,
61-
host_python_version = target.python_version,
61+
default_python_version = target.python_version,
6262
)
6363

6464
env.expect.that_collection(got.deps).contains_exactly(["bar"])
@@ -82,7 +82,7 @@ def test_deps_are_added_to_more_specialized_platforms(env):
8282
"osx_x86_64",
8383
"osx_aarch64",
8484
],
85-
host_python_version = "3.8.4",
85+
default_python_version = "3.8.4",
8686
)
8787

8888
env.expect.that_collection(got.deps).contains_exactly(["mac_dep"])
@@ -106,7 +106,7 @@ def test_non_platform_markers_are_added_to_common_deps(env):
106106
"osx_aarch64",
107107
"windows_x86_64",
108108
],
109-
host_python_version = "3.8.4",
109+
default_python_version = "3.8.4",
110110
)
111111

112112
env.expect.that_collection(got.deps).contains_exactly(["bar", "baz"])
@@ -191,7 +191,7 @@ def _test_no_version_select_when_single_version(env):
191191
"cp38_linux_x86_64",
192192
"cp38_windows_x86_64",
193193
],
194-
host_python_version = "",
194+
default_python_version = "",
195195
)
196196

197197
env.expect.that_collection(got.deps).contains_exactly(["bar", "baz", "arch_dep"])
@@ -210,7 +210,7 @@ def _test_can_get_version_select(env):
210210
"posix_dep_with_version; os_name=='posix' and python_version >= '3.8'",
211211
"arch_dep; platform_machine=='x86_64' and python_version < '3.8'",
212212
]
213-
host_python_version = "3.7.4"
213+
default_python_version = "3.7.4"
214214

215215
got = deps(
216216
"foo",
@@ -220,7 +220,7 @@ def _test_can_get_version_select(env):
220220
for minor in [7, 8, 9]
221221
for os in ["linux", "windows"]
222222
],
223-
host_python_version = host_python_version,
223+
default_python_version = default_python_version,
224224
)
225225

226226
env.expect.that_collection(got.deps).contains_exactly(["bar"])
@@ -243,7 +243,7 @@ def _test_deps_spanning_all_target_py_versions_are_added_to_common(env):
243243
"baz (<2,>=1.11) ; python_version < '3.8'",
244244
"baz (<2,>=1.14) ; python_version >= '3.8'",
245245
]
246-
host_python_version = "3.8.4"
246+
default_python_version = "3.8.4"
247247

248248
got = deps(
249249
"foo",
@@ -252,7 +252,7 @@ def _test_deps_spanning_all_target_py_versions_are_added_to_common(env):
252252
"cp3{}_linux_x86_64".format(minor)
253253
for minor in [7, 8, 9]
254254
],
255-
host_python_version = host_python_version,
255+
default_python_version = default_python_version,
256256
)
257257

258258
env.expect.that_collection(got.deps).contains_exactly(["bar", "baz"])
@@ -261,7 +261,7 @@ def _test_deps_spanning_all_target_py_versions_are_added_to_common(env):
261261
_tests.append(_test_deps_spanning_all_target_py_versions_are_added_to_common)
262262

263263
def _test_deps_are_not_duplicated(env):
264-
host_python_version = "3.7.4"
264+
default_python_version = "3.7.4"
265265

266266
# See an example in
267267
# https://files.pythonhosted.org/packages/76/9e/db1c2d56c04b97981c06663384f45f28950a73d9acf840c4006d60d0a1ff/opencv_python-4.9.0.80-cp37-abi3-win32.whl.metadata
@@ -285,7 +285,7 @@ def _test_deps_are_not_duplicated(env):
285285
for os in ["linux", "osx", "windows"]
286286
for arch in ["x86_64", "aarch64"]
287287
],
288-
host_python_version = host_python_version,
288+
default_python_version = default_python_version,
289289
)
290290

291291
env.expect.that_collection(got.deps).contains_exactly(["bar"])
@@ -294,7 +294,7 @@ def _test_deps_are_not_duplicated(env):
294294
_tests.append(_test_deps_are_not_duplicated)
295295

296296
def _test_deps_are_not_duplicated_when_encountering_platform_dep_first(env):
297-
host_python_version = "3.7.1"
297+
default_python_version = "3.7.1"
298298

299299
# Note, that we are sorting the incoming `requires_dist` and we need to ensure that we are not getting any
300300
# issues even if the platform-specific line comes first.
@@ -312,7 +312,7 @@ def _test_deps_are_not_duplicated_when_encountering_platform_dep_first(env):
312312
"cp310_linux_aarch64",
313313
"cp310_linux_x86_64",
314314
],
315-
host_python_version = host_python_version,
315+
default_python_version = default_python_version,
316316
)
317317

318318
env.expect.that_collection(got.deps).contains_exactly([])

0 commit comments

Comments
 (0)