def test_close_on_upgrade_or_removal(self, close_on_upgrade_or_removal): if close_on_upgrade_or_removal is False and 'windows' in get_platform_string( ): # this is not supported on Windows because we cannot override running executables raise unittest.SkipTest("Skipping") # for debian-based, this decision occurs in the version being upgraded self._apply_close_on_upgrade_or_removal( 'true' if close_on_upgrade_or_removal else 'false') self._rebuild_package() self.install_package() cleanup_buildout_logs() # start process and upgrade pid = self._run_the_installed_script_in_the_background() self._rebuild_package() self.install_package() # assert on upgrade cleanup_buildout_logs() pid.poll() self.assertEqual(close_on_upgrade_or_removal, pid.is_finished()) # start process and uninstall pid = self._run_the_installed_script_in_the_background() self.uninstall_package() # assert on removal cleanup_buildout_logs() pid.poll() self.assertEqual(close_on_upgrade_or_removal, pid.is_finished())
def setUpClass(cls): if not cls.should_run(): raise unittest.SkipTest("Skipping") delete_buildout_logs() with chdir(TESTCASE_DIR): delete_existing_builds() create_console_scripts() create_package()
def setUp(self): try: self.model = get_storage_model() except ImportError: raise unittest.SkipTest() self.scsi = self.model.get_scsi()
def setUpClass(cls): super(SixthDriveTestCase, cls).setUpClass() if socket.gethostname() != 'host-ci38': raise unittest.SkipTest( "This test case should run only on host-ci38")
def setUpClass(cls): super(WmiTestCase, cls).setUpClass() if os.name != 'nt': raise unittest.SkipTest( "This test case should run only on Windows")