Add python3 embedded launcher support
Test: m par_test{,3}; build/soong/python/tests/runtest.sh
Change-Id: I9c0fac9e2947616fdeedbfc55026dc3065966e71
diff --git a/python/tests/testpkg/par_test.py b/python/tests/testpkg/par_test.py
index 22dd095..ffad430 100644
--- a/python/tests/testpkg/par_test.py
+++ b/python/tests/testpkg/par_test.py
@@ -29,7 +29,13 @@
assert_equal("__name__", __name__, "testpkg.par_test")
assert_equal("__file__", __file__, os.path.join(archive, "testpkg/par_test.py"))
-assert_equal("__package__", __package__, "testpkg")
+
+# Python3 is returning None here for me, and I haven't found any problems caused by this.
+if sys.version_info[0] == 2:
+ assert_equal("__package__", __package__, "testpkg")
+else:
+ assert_equal("__package__", __package__, None)
+
assert_equal("__loader__.archive", __loader__.archive, archive)
assert_equal("__loader__.prefix", __loader__.prefix, "testpkg/")