Skip to content

Commit cb568cf

Browse files
committed
Add Rubicon tests
1 parent c60f036 commit cb568cf

File tree

4 files changed

+33
-2
lines changed

4 files changed

+33
-2
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
from beeware_pythonnative.app import main
22

3-
if __name__ == '__main__':
3+
if __name__ == "__main__":
44
main().main_loop()

apps/beeware_pythonnative/tests/beeware_pythonnative.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ def run_tests():
2525
# Overwrite the cache directory to somewhere writable
2626
"-o",
2727
f"cache_dir={tempfile.gettempdir()}/.pytest_cache",
28-
] + args
28+
]
29+
+ args
2930
)
3031

3132
print(f">>>>>>>>>> EXIT {returncode} <<<<<<<<<<")

libs/rubicon_java_tests.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
from rubicon.java import JavaClass
2+
3+
4+
def main():
5+
"""
6+
https://github.com/beeware/rubicon-java.
7+
"""
8+
URL = JavaClass("java/net/URL")
9+
url = URL("https://beeware.org")
10+
print(url.getHost())
11+
12+
13+
if __name__ == "__main__":
14+
main()

libs/rubicon_objc_test.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
from rubicon.objc import ObjCClass
2+
3+
4+
def main():
5+
"""
6+
https://rubicon-objc.readthedocs.io/en/stable/tutorial/tutorial-1.html.
7+
"""
8+
NSURL = ObjCClass("NSURL")
9+
base = NSURL.URLWithString("https://beeware.org/")
10+
full = NSURL.URLWithString("contributing/", relativeToURL=base)
11+
absolute = full.absoluteURL
12+
print(absolute.description)
13+
14+
15+
if __name__ == "__main__":
16+
main()

0 commit comments

Comments
 (0)