Skip to content

Commit

Permalink
[COVERAGE] slight improvement of code coverage
Browse files Browse the repository at this point in the history
Changes in file tests/context.py:
 def setUpClass(cls):

Changes in file tests/test_basic.py:
 def test_Does_Pass_WHEN_Using_Import_From_Syntax(self):
 def test_Error_WHEN_the_help_command_is_called(self):
  • Loading branch information
reactive-firewall committed Aug 28, 2024
1 parent 0d10252 commit a8fe407
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tests/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ def setUp(self):
"""Overides unittest.TestCase.setUp(unittest.TestCase).
Defaults is to skip test if class is missing thepython test fixture.
"""
if (self._thepython is None) and (len(self._thepython) <= 0):
if (self._thepython is not None) and (len(self._thepython) <= 0):
self.skipTest(str("""No python cmd to test with!"""))

@unittest.skipUnless(True, """Insanitty Test. Good luck debugging.""")
Expand All @@ -590,7 +590,7 @@ def test_absolute_truth_and_meaning(self):

def test_finds_python_WHEN_testing(self):
"""Test case 1: Class Test-Fixture Meta Test."""
if (self._thepython is None) and (len(self._thepython) <= 0):
if (self._thepython is not None) and (len(self._thepython) <= 0):
self.fail(str("""No python cmd to test with!"""))
self.test_absolute_truth_and_meaning()

Expand Down
6 changes: 2 additions & 4 deletions tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ def test_Error_WHEN_the_help_command_is_called(self):
try:
from .context import multicast
self.assertIsNotNone(multicast.__name__)
if multicast.__name__ is None:
theResult = False
theResult = (multicast.__name__ is not None)
with self.assertRaises(Exception):
raise RuntimeError("This is a test")
with self.assertRaises(Exception):
Expand All @@ -90,8 +89,7 @@ def test_IsNone_WHEN_given_corner_case_input(self):
theResult = False
try:
from .context import multicast
if multicast.__name__ is None:
theResult = False
theResult = (multicast.__name__ is not None)
from multicast import __main__ as multicast
tst_dispatch = multicast.McastDispatch()
test_junk_values = [None, "JunkInput", "--Junk"]
Expand Down

0 comments on commit a8fe407

Please sign in to comment.