summaryrefslogtreecommitdiffstats
path: root/unitest.py
diff options
context:
space:
mode:
authorJiajie Chen <c@jia.je>2022-07-09 16:32:59 +0800
committerJiajie Chen <c@jia.je>2022-07-09 16:34:00 +0800
commitc8f6e4d1bca5306d5b663268b79928131874c7c0 (patch)
treefe0481a59ca3232fc6fe7091dc27611c734f89d0 /unitest.py
parent5a44de0080a06070f14d689462414d24f839f9df (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-xunitest.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/unitest.py b/unitest.py
index 39762144..d6f29888 100755
--- a/unitest.py
+++ b/unitest.py
@@ -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))