def setUp(self): """Deletes *.apk if it already installed""" global valid_package_name result = adb.shell('pm list packages | grep ' + valid_package_name) if re.search(exp_install_cmd_output, result[1]): print('*** uninstalling existing ' + valid_package_name) adb.uninstall(valid_package_name) else: print('*** no need to uninstall ' + valid_package_name + ' since\ it is not yet installed')
def setUp(self): """Deletes *.apk if it already installed""" global VALID_PACKAGE_NAME result = adb.shell('pm list packages | grep ' + VALID_PACKAGE_NAME) if re.search(exp_install_cmd_output, result[1]): print('*** uninstalling existing ' + VALID_PACKAGE_NAME) adb.uninstall(VALID_PACKAGE_NAME, []) else: print('*** no need to uninstall ' + VALID_PACKAGE_NAME + ' since\ it is not yet installed')
def setUp(self): """Deletes *.apk if it already installed""" global VALID_PACKAGE_NAME result = adb.shell('pm list packages | grep ' + VALID_PACKAGE_NAME) if re.search(exp_install_cmd_output, result[1]): print('*** uninstalling existing ' + VALID_PACKAGE_NAME) adb.uninstall(VALID_PACKAGE_NAME) else: print('*** no need to uninstall ' + VALID_PACKAGE_NAME + ' since\ it is not yet installed')
def setUp(self): """Deletes *.apk if it already installed""" global valid_package_name result = adb.shell("pm list packages | grep " + valid_package_name) if re.search(exp_install_cmd_output, result[1]): print("*** uninstalling existing " + valid_package_name) adb.uninstall(valid_package_name) else: print( "*** no need to uninstall " + valid_package_name + " since\ it is not yet installed" )
def test_uninstall_n_invalid_package_name(self): global invalid_package_name result = adb.uninstall(invalid_package_name) self.assertRegexpMatches(result[1], 'DELETE_FAILED_INTERNAL_ERROR')
def test_uninstall_keep_data(self): global valid_package_name result = adb.uninstall(valid_package_name, '-k') self.assertRegexpMatches(result[1], 'Success')
def test_uninstall_invalid_package_name(self): global INVALID_PACKAGE_NAME result = adb.uninstall(INVALID_PACKAGE_NAME) self.assertRegexpMatches(result[1], 'DELETE_FAILED_INTERNAL_ERROR')
def test_uninstall_keep_data(self): global VALID_PACKAGE_NAME result = adb.uninstall(VALID_PACKAGE_NAME, '-k') self.assertRegexpMatches(result[1], 'Success')
def test_uninstall_invalid_package_name(self): result = adb.uninstall(INVALID_PACKAGE_NAME) result[1].should.match(r'DELETE_FAILED_INTERNAL_ERROR')
def test_uninstall(self): result = adb.uninstall(VALID_PACKAGE_NAME) result[1].should.match(r'Success')
def test_uninstall_n_invalid_package_name(self): global invalid_package_name result = adb.uninstall(invalid_package_name) self.assertRegexpMatches(result[1], "DELETE_FAILED_INTERNAL_ERROR")
def test_uninstall_keep_data(self): global valid_package_name result = adb.uninstall(valid_package_name, "-k") self.assertRegexpMatches(result[1], "Success")