This repo hasn't had a successful analysis for its default branch yet.

intracom-telecom-sdn/nstat

View on GitHub
util/unittests/test_file.py

Summary

Maintainability
A
2 hrs
Test Coverage

Showing 4 of 4 total issues

Similar blocks of code found in 5 locations. Consider refactoring.
Open

if __name__ == '__main__':
SUITE_FILE_TEST = unittest.TestLoader().\
loadTestsFromTestCase(FileTestFileExist)
unittest.TextTestRunner(verbosity=2).run(SUITE_FILE_TEST)
Severity: Major
Found in util/unittests/test_file.py and 4 other locations - About 1 hr to fix
util/unittests/test_netutil.py on lines 168..170
util/unittests/test_plot_json.py on lines 107..110
util/unittests/test_process.py on lines 190..193
util/unittests/test_stats.py on lines 46..49

Similar blocks of code found in 3 locations. Consider refactoring.
Open

def test_file_exists_03(self):
"""Checks if foo3.txt exist within the self.virtualfolder.
"""
self.assertTrue(f.file_exists(self.filepath[2]))
Severity: Minor
Found in util/unittests/test_file.py and 2 other locations - About 30 mins to fix
util/unittests/test_file.py on lines 55..58
util/unittests/test_file.py on lines 60..63

Similar blocks of code found in 3 locations. Consider refactoring.
Open

def test_file_exists_01(self):
"""Checks if foo1.txt exists within self.virtualfolder folder
"""
self.assertTrue(f.file_exists(self.filepath[0]))
Severity: Minor
Found in util/unittests/test_file.py and 2 other locations - About 30 mins to fix
util/unittests/test_file.py on lines 60..63
util/unittests/test_file.py on lines 65..68

Similar blocks of code found in 3 locations. Consider refactoring.
Open

def test_file_exists_02(self):
"""Checks if foo2.txt exists within the self.virtualfolder folder
"""
self.assertTrue(f.file_exists(self.filepath[1]))
Severity: Minor
Found in util/unittests/test_file.py and 2 other locations - About 30 mins to fix
util/unittests/test_file.py on lines 55..58
util/unittests/test_file.py on lines 65..68

There are no issues that match your filters.

Category
Status