Skip to content

Instantly share code, notes, and snippets.

@trollknurr
Created May 6, 2016 11:31
Show Gist options
  • Save trollknurr/5d6978935c076d5dd8579fe44306b562 to your computer and use it in GitHub Desktop.
Save trollknurr/5d6978935c076d5dd8579fe44306b562 to your computer and use it in GitHub Desktop.
Assert list in list of lists and has equal content
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