Skip to content

Commit

Permalink
Add lib_and_main.py test
Browse files Browse the repository at this point in the history
  • Loading branch information
adzenith committed Jan 8, 2024
1 parent b4efd85 commit 43db643
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,16 @@ py_library(
name = "lib2",
srcs = ["lib2.py"],
visibility = ["//:__subpackages__"],
deps = [":lib"],
deps = [
":lib",
":lib_and_main",
],
)

py_binary(
name = "lib_and_main",
srcs = ["lib_and_main.py"],
visibility = ["//:__subpackages__"],
)

py_binary(
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
import lib
import lib_and_main
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
def library_func():
print("library_func")


if __name__ == "__main__":
library_func()
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import lib2

if __name__ == "__main__":
run()
lib2.lib_and_main.library_func()

0 comments on commit 43db643

Please sign in to comment.