示例#1
0
 def test_check_requirements(self):
     """Basic tests for the check_requirements() method."""
     target_android = init_target(self.temp_dir)
     buildozer = target_android.buildozer
     assert not hasattr(target_android, "adb_cmd")
     assert not hasattr(target_android, "javac_cmd")
     assert "PATH" not in buildozer.environ
     with patch_buildozer_checkbin() as m_checkbin:
         target_android.check_requirements()
     assert m_checkbin.call_args_list == [
         mock.call("Git (git)", "git"),
         mock.call("Cython (cython)", "cython"),
         mock.call("Java compiler (javac)", "javac"),
         mock.call("Java keytool (keytool)", "keytool"),
     ]
     assert target_android.adb_cmd.endswith(
         ".buildozer/android/platform/android-sdk/platform-tools/adb")
     assert target_android.javac_cmd == "javac"
     assert target_android.keytool_cmd == "keytool"
     assert "PATH" in buildozer.environ
示例#2
0
 def test_check_requirements(self):
     """Basic tests for the check_requirements() method."""
     target = init_target(self.temp_dir)
     buildozer = target.buildozer
     assert not hasattr(target, "adb_cmd")
     assert not hasattr(target, "javac_cmd")
     assert "PATH" not in buildozer.environ
     with patch_buildozer_checkbin() as m_checkbin:
         target.check_requirements()
     assert m_checkbin.call_args_list == [
         mock.call("Xcode xcodebuild", "xcodebuild"),
         mock.call("Xcode xcode-select", "xcode-select"),
         mock.call("Git git", "git"),
         mock.call("Cython cython", "cython"),
         mock.call("pkg-config", "pkg-config"),
         mock.call("autoconf", "autoconf"),
         mock.call("automake", "automake"),
         mock.call("libtool", "libtool"),
     ]
     assert target._toolchain_cmd.endswith("toolchain.py ")
     assert target._xcodebuild_cmd == "xcodebuild "