Created
March 11, 2015 12:47
-
-
Save VitamintK/24953b6b4d6ef43f47e3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def setUp(self): | |
self.mybag = Bag(['d','a','b','d','c','b','d']) | |
def test_len(self): | |
self.assertEqual(len(self.mybag), 7) | |
for removal in ['d','a','b','d','c','b','d']: | |
baglen = len(self.mybag) | |
self.mybag.remove(removal) | |
self.assertEqual(baglen - 1, len(self.mybag)) | |
self.assertEqual(0, len(self.mybag)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment