Created
May 6, 2016 11:31
-
-
Save trollknurr/5d6978935c076d5dd8579fe44306b562 to your computer and use it in GitHub Desktop.
Assert list in list of lists and has equal content
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 assertListInList(self, member, container): | |
for item in container: | |
try: | |
self.assertCountEqual(item, member) | |
except AssertionError: | |
continue | |
break | |
else: | |
raise AssertionError('No match found') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment