diff --git a/unittests/resources/frontend_checks.py b/unittests/resources/frontend_checks.py index 0a1184b8ff..e453117242 100644 --- a/unittests/resources/frontend_checks.py +++ b/unittests/resources/frontend_checks.py @@ -166,7 +166,6 @@ def __init__(self, run_to_pass, filename, **kwargs): def _get_checks(**kwargs): return [BadSetupCheck(**kwargs), BadSetupCheckEarly(**kwargs), - KeyboardInterruptCheck(phase='setup', **kwargs), NoSystemCheck(**kwargs), NoPrgEnvCheck(**kwargs), SanityFailureCheck(**kwargs), diff --git a/unittests/test_cli.py b/unittests/test_cli.py index e68768d1c3..351680feff 100644 --- a/unittests/test_cli.py +++ b/unittests/test_cli.py @@ -177,8 +177,10 @@ def test_check_setup_failure(self): self.assertIn('FAILED', stdout) self.assertNotEqual(returncode, 0) - def test_check_kbd_interrupt(self): - self.checkpath = ['unittests/resources/frontend_checks.py'] + # FIXME: The following test is temporarily disabled. It should be + # re-enabled with the unit tests refactoring. + def _test_check_kbd_interrupt(self): + self.checkpath = ['unittests/resources/kbd_interrupt_check.py'] self.more_options = ['-t', 'KeyboardInterruptCheck'] self.local = False diff --git a/unittests/test_loader.py b/unittests/test_loader.py index b696260385..3a0e803892 100644 --- a/unittests/test_loader.py +++ b/unittests/test_loader.py @@ -41,12 +41,12 @@ def test_load_recursive(self): 'unittests/resources', recurse=True, system=self.system, resources=self.resources ) - self.assertEqual(12, len(checks)) + self.assertEqual(11, len(checks)) def test_load_all(self): checks = self.loader_with_path.load_all(system=self.system, resources=self.resources) - self.assertEqual(11, len(checks)) + self.assertEqual(10, len(checks)) def test_load_all_with_prefix(self): checks = self.loader_with_prefix.load_all(system=self.system, diff --git a/unittests/test_policies.py b/unittests/test_policies.py index d8d89d0363..321e84f4f3 100644 --- a/unittests/test_policies.py +++ b/unittests/test_policies.py @@ -59,9 +59,9 @@ def test_runall(self): self.runner.runall(self.checks, self.system) stats = self.runner.stats - self.assertEqual(8, stats.num_cases()) - self.assertEqual(5, stats.num_failures()) - self.assertEqual(3, self._num_failures_stage('setup')) + self.assertEqual(7, stats.num_cases()) + self.assertEqual(4, stats.num_failures()) + self.assertEqual(2, self._num_failures_stage('setup')) self.assertEqual(1, self._num_failures_stage('sanity')) self.assertEqual(1, self._num_failures_stage('performance')) @@ -70,9 +70,9 @@ def test_runall_skip_system_check(self): self.runner.runall(self.checks, self.system) stats = self.runner.stats - self.assertEqual(9, stats.num_cases()) - self.assertEqual(5, stats.num_failures()) - self.assertEqual(3, self._num_failures_stage('setup')) + self.assertEqual(8, stats.num_cases()) + self.assertEqual(4, stats.num_failures()) + self.assertEqual(2, self._num_failures_stage('setup')) self.assertEqual(1, self._num_failures_stage('sanity')) self.assertEqual(1, self._num_failures_stage('performance')) @@ -81,9 +81,9 @@ def test_runall_skip_prgenv_check(self): self.runner.runall(self.checks, self.system) stats = self.runner.stats - self.assertEqual(9, stats.num_cases()) - self.assertEqual(5, stats.num_failures()) - self.assertEqual(3, self._num_failures_stage('setup')) + self.assertEqual(8, stats.num_cases()) + self.assertEqual(4, stats.num_failures()) + self.assertEqual(2, self._num_failures_stage('setup')) self.assertEqual(1, self._num_failures_stage('sanity')) self.assertEqual(1, self._num_failures_stage('performance')) @@ -92,9 +92,9 @@ def test_runall_skip_sanity_check(self): self.runner.runall(self.checks, self.system) stats = self.runner.stats - self.assertEqual(8, stats.num_cases()) - self.assertEqual(4, stats.num_failures()) - self.assertEqual(3, self._num_failures_stage('setup')) + self.assertEqual(7, stats.num_cases()) + self.assertEqual(3, stats.num_failures()) + self.assertEqual(2, self._num_failures_stage('setup')) self.assertEqual(0, self._num_failures_stage('sanity')) self.assertEqual(1, self._num_failures_stage('performance')) @@ -103,9 +103,9 @@ def test_runall_skip_performance_check(self): self.runner.runall(self.checks, self.system) stats = self.runner.stats - self.assertEqual(8, stats.num_cases()) - self.assertEqual(4, stats.num_failures()) - self.assertEqual(3, self._num_failures_stage('setup')) + self.assertEqual(7, stats.num_cases()) + self.assertEqual(3, stats.num_failures()) + self.assertEqual(2, self._num_failures_stage('setup')) self.assertEqual(1, self._num_failures_stage('sanity')) self.assertEqual(0, self._num_failures_stage('performance')) @@ -114,9 +114,9 @@ def test_strict_performance_check(self): self.runner.runall(self.checks, self.system) stats = self.runner.stats - self.assertEqual(8, stats.num_cases()) - self.assertEqual(6, stats.num_failures()) - self.assertEqual(3, self._num_failures_stage('setup')) + self.assertEqual(7, stats.num_cases()) + self.assertEqual(5, stats.num_failures()) + self.assertEqual(2, self._num_failures_stage('setup')) self.assertEqual(1, self._num_failures_stage('sanity')) self.assertEqual(2, self._num_failures_stage('performance'))