commit | 63f059e8de652b23e9c680bcaefeda9a8a72666e | [log] [tgz] |
---|---|---|
author | zhufl <zhu.fanglei@zte.com.cn> | Mon Jun 12 13:56:18 2017 +0800 |
committer | zhufl <zhu.fanglei@zte.com.cn> | Mon Jun 12 14:14:30 2017 +0800 |
tree | b60362c59215547efa3da71bd8510fe42fca1e3a | |
parent | a194cf1d91cb21616e1b4dec3c37d05c46486fe1 [diff] |
Do not use any() to check whether a list is empty any() is used to check whether there is at least one element in an iterator that is True, e.g., >>> any([0, 0]) False Although self.assertEqual(any([])) will get the same result as self.assertEmpty([]), but it will make the code look not so straightforward, so this is to fix the unsuitable usage of any() Change-Id: Icd313ebc1ca22b1c23e3f397bd16dfda0e31f8ee