-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathBUILD
More file actions
72 lines (62 loc) · 1.76 KB
/
BUILD
File metadata and controls
72 lines (62 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# *******************************************************************************
# Copyright (c) 2025 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************
load("@bazel_tools_python//quality:defs.bzl", "py_pytest", "python_tool_config")
load("@rules_python//python:defs.bzl", "py_binary", "py_library")
load("@test_pip_hub//:loaders.bzl", "pkg")
################
# Config pytest.
################
python_tool_config(
name = "quality_python_default_config",
config = "//:awesome_pyproject",
visibility = ["//visibility:public"],
)
label_flag(
name = "quality_pytest_config",
build_setting_default = "//:quality_python_default_config",
visibility = ["//visibility:public"],
)
py_pytest(
name = "dummy_pytest",
srcs = ["dummy_pytest.py"],
)
py_library(
name = "py_custom_test_deps",
visibility = ["//visibility:public"],
deps = [
pkg("pytest"),
pkg("pytest-loop"),
],
)
filegroup(
name = "awesome_pyproject",
srcs = ["awesome_pyproject.toml"],
visibility = ["//visibility:public"],
)
######################
# Python test targets.
######################
py_binary(
name = "dummy_bin",
srcs = ["dummy_bin.py"],
deps = [":dummy_lib"],
)
py_library(
name = "dummy_lib",
srcs = ["dummy_lib.py"],
)
py_pytest(
name = "dummy_test",
srcs = ["dummy_test.py"],
deps = [":dummy_bin"],
)