Drop unused test utility
assertIsNotEmpty is not at all used. Also assertIsEmpty can be easily replaced by the built-in implementation. Change-Id: I57af7f1387d9ac9f97fbcd34f0aca7953abe0778
This commit is contained in:
parent
7b2056456f
commit
e43cf94aeb
@ -123,20 +123,6 @@ class BaseTestCase(base.BaseTestCase):
|
||||
0.0,
|
||||
places=5)
|
||||
|
||||
def assertIsEmpty(self, obj):
|
||||
try:
|
||||
if len(obj) != 0:
|
||||
self.fail("%s is not empty" % type(obj))
|
||||
except (TypeError, AttributeError):
|
||||
self.fail("%s doesn't have length" % type(obj))
|
||||
|
||||
def assertIsNotEmpty(self, obj):
|
||||
try:
|
||||
if len(obj) == 0:
|
||||
self.fail("%s is empty" % type(obj))
|
||||
except (TypeError, AttributeError):
|
||||
self.fail("%s doesn't have length" % type(obj))
|
||||
|
||||
@staticmethod
|
||||
def path_get(project_file=None):
|
||||
root = os.path.abspath(os.path.join(os.path.dirname(__file__),
|
||||
|
@ -265,5 +265,5 @@ class TestPartitioning(base.BaseTestCase):
|
||||
self.assertTrue(coord._coordinator.is_started)
|
||||
coord.join_group("123")
|
||||
coord.stop()
|
||||
self.assertIsEmpty(coord._groups)
|
||||
self.assertEqual(0, len(coord._groups))
|
||||
self.assertIsNone(coord._coordinator)
|
||||
|
Loading…
x
Reference in New Issue
Block a user