Skip to content

Instantly share code, notes, and snippets.

@henriquebastos
Created January 4, 2016 14:37
Show Gist options
  • Save henriquebastos/c1f36fe36095b0ddd605 to your computer and use it in GitHub Desktop.
Save henriquebastos/c1f36fe36095b0ddd605 to your computer and use it in GitHub Desktop.
Exemplo de subTest
def test_html(self):
expectations = [('<form', 1),
('<input', 6),
('type="text"', 3),
('type="email"', 1),
('type="submit"', 1)]
with self.subTest():
for text, count in expectations:
self.assertContains(self.resp, text, count)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment