Skip to content

Commit fa0130f

Browse files
committed
example: improve basic test
note: on windows deps[:basic] in basic_test may fail while basic_lib_test work
1 parent 9017093 commit fa0130f

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

examples/basic/BUILD.bazel

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ pybind_extension(
88
srcs = ["basic.cpp"],
99
)
1010

11+
py_test(
12+
name = "basic_pybind_test",
13+
size="small",
14+
srcs = ["basic_test.py"],
15+
main = "basic_test.py",
16+
deps = [":basic"],
17+
)
18+
1119
py_wheel(
1220
name = "basic_wheel",
1321
testonly = True,
@@ -22,17 +30,18 @@ py_library(
2230
imports = ["."],
2331
)
2432

33+
py_test(
34+
name = "basic_lib_test",
35+
size="small",
36+
srcs = ["basic_test.py"],
37+
main = "basic_test.py",
38+
deps = [":basic_lib"],
39+
)
40+
2541
py_wheel(
2642
name = "basic_lib_wheel",
2743
testonly = True,
2844
distribution = "basic_lib",
2945
version = "1.0.0",
3046
deps = [":basic_lib"],
3147
)
32-
33-
py_test(
34-
name = "basic_test",
35-
size="small",
36-
srcs = ["basic_test.py"],
37-
deps = [":basic_lib"],
38-
)

0 commit comments

Comments
 (0)