generated from bazel-contrib/rules-template
-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add smoke test to e2e/use_release
- Loading branch information
Showing
6 changed files
with
45 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,18 @@ | ||
load("@aspect_rules_py//py:defs.bzl", "py_binary") | ||
load("@aspect_rules_py//py:defs.bzl", "py_binary", "py_test") | ||
|
||
py_binary( | ||
name = "main", | ||
srcs = ["__main__.py"], | ||
srcs = [ | ||
"__init__.py", | ||
"__main__.py", | ||
], | ||
main = "__main__.py", | ||
) | ||
|
||
py_test( | ||
name = "test", | ||
srcs = ["test.py"], | ||
deps = [ | ||
":main", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
def welcome(name): | ||
return "hello %s" % name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
print("hello world") | ||
from __init__ import welcome | ||
|
||
if __name__ == "__main__": | ||
print(welcome("world")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from __init__ import welcome | ||
|
||
def test_welcome(): | ||
greeting = welcome("world") | ||
assert greeting == "Hello world" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters