Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion unittests/resources/frontend_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
6 changes: 4 additions & 2 deletions unittests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions unittests/test_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
36 changes: 18 additions & 18 deletions unittests/test_policies.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'))

Expand All @@ -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'))

Expand All @@ -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'))

Expand All @@ -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'))

Expand All @@ -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'))

Expand All @@ -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'))

Expand Down