Showing 8 of 8 total issues
Cyclomatic complexity is too high in method setUpClass. (7) Open
@classmethod def setUpClass(cls): """Initializes the testing environment parameters. Starts the server process """
- Read upRead up
- Exclude checks
Function setUpClass
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def setUpClass(cls): """Initializes the testing environment parameters. Starts the server process """ cls.LISTEN_PORT = 65535
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
def test_getpid_listeningonport_03(self): """Checks the getpid_listeningonport() function of util/process.py module. In this scenario we check the result in case we give as input to the function something that is not a port number. """
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
def test_getpid_listeningonport_02(self): """Checks the getpid_listeningonport() function of util/process.py module. In this scenario we check the result in case we give as input to the function, a port number on which a process that the user not owns is listening.
- Read upRead up
Similar blocks of code found in 5 locations. Consider refactoring. Open
if __name__ == '__main__': SUITE_PROCESSTESTALLFUNCTIONS = unittest.TestLoader().\ loadTestsFromTestCase(ProcessTestAllFunctions) unittest.TextTestRunner(verbosity=2).run(SUITE_PROCESSTESTALLFUNCTIONS)
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
def test_is_process_running_01(self): """Checks the is_process_running() function of util/process.py module. In this scenario we check the result in case we give as input to the function a valid process id. """
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
def test_is_process_running_02(self): """Checks the is_process_running() function of util/process.py module. In this scenario we check the result in case we give as input to the function a invalid process id. """
- Read upRead up
Similar blocks of code found in 5 locations. Consider refactoring. Open
def test_getpid_listeningonport_01(self): """Checks the getpid_listeningonport() function of util/process.py module. Checks the equality between the known process id of the initializes server, with the one returned from the function. """
- Read upRead up