Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
wade-arista committed Feb 14, 2024
1 parent ebbd5d0 commit 36b3f40
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 34 deletions.
10 changes: 1 addition & 9 deletions mod_pytest/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
bazel_dep(name = "rules_python", version = "0.31.0")

register_toolchains("//tools:system_python")

pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pip",
python_interpreter = "/usr/bin/python",
python_version = "3.9",
python_version = "3.11",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pip")

python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
is_default = True,
python_version = "3.9",
)
7 changes: 5 additions & 2 deletions mod_pytest/pkg1/test/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ py_test(
name = "basic_pytest",
srcs = ["basic_pytest.py"],
imports = [".."],
legacy_create_init = False,
deps = ["//pkg1/pkg1"],
legacy_create_init = False, # required for pytest.main()
deps = [
"//pkg1/pkg1",
"@pip//pytest:pkg",
],
)
4 changes: 3 additions & 1 deletion mod_pytest/requirements.in
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
pytest==8.0.0
pytest
tomli
exceptiongroup
6 changes: 3 additions & 3 deletions mod_pytest/requirements_lock.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#
# This file is autogenerated by pip-compile with Python 3.9
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# bazel run //:requirements.update
#
exceptiongroup==1.2.0 \
--hash=sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14 \
--hash=sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68
# via pytest
# via -r requirements.in
iniconfig==2.0.0 \
--hash=sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3 \
--hash=sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374
Expand All @@ -27,4 +27,4 @@ pytest==8.0.0 \
tomli==2.0.1 \
--hash=sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc \
--hash=sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f
# via pytest
# via -r requirements.in
19 changes: 0 additions & 19 deletions mod_pytest/tools/BUILD.bazel

This file was deleted.

0 comments on commit 36b3f40

Please sign in to comment.