diff options
author | Jiajie Chen <c@jia.je> | 2022-07-09 16:32:59 +0800 |
---|---|---|
committer | Jiajie Chen <c@jia.je> | 2022-07-09 16:34:00 +0800 |
commit | c8f6e4d1bca5306d5b663268b79928131874c7c0 (patch) | |
tree | fe0481a59ca3232fc6fe7091dc27611c734f89d0 /unitest.py | |
parent | 5a44de0080a06070f14d689462414d24f839f9df (diff) |
fix: fix unit testing on macOS
In test_017_programs, the following exception may occur:
TypeError: unsupported operand type(s) for +=: 'int' and 'NoneType'
This commit fixes this exception by giving a default value for None.
Diffstat (limited to 'unitest.py')
-rwxr-xr-x | unitest.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -277,7 +277,7 @@ class TestGlances(unittest.TestCase): def test_017_programs(self): """Check Programs function (it's not a plugin).""" # stats_to_check = [ ] - print('INFO: [TEST_010] Check PROGRAM stats') + print('INFO: [TEST_017] Check PROGRAM stats') stats_grab = processes_to_programs(stats.get_plugin('processlist').get_raw()) self.assertTrue(type(stats_grab) is list, msg='Programs stats is not a list') print('INFO: PROGRAM list stats: %s items in the list' % len(stats_grab)) |