Skip to content

Commit 40e7e63

Browse files
committed
test note and normalize asserts
1 parent fe8a842 commit 40e7e63

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

tests/unit/test_metadata.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -480,13 +480,16 @@ def test_user_type(self):
480480

481481
class HostsTests(unittest.TestCase):
482482
def test_iterate_all_hosts_and_modify(self):
483+
"""
484+
PYTHON-572
485+
"""
483486
metadata = Metadata()
484487
metadata.add_or_return_host(Host('dc1.1', SimpleConvictionPolicy))
485488
metadata.add_or_return_host(Host('dc1.2', SimpleConvictionPolicy))
486489

487-
assert len(metadata.all_hosts()) == 2
490+
self.assertEqual(len(metadata.all_hosts()), 2)
488491

489-
for host in metadata.all_hosts():
492+
for host in metadata.all_hosts(): # this would previously raise in Py3
490493
metadata.remove_host(host)
491494

492-
assert len(metadata.all_hosts()) == 0
495+
self.assertEqual(len(metadata.all_hosts()), 0)

0 commit comments

Comments
 (0)