Created
August 10, 2018 02:19
-
-
Save marceloandriolli/ce9c1ecd712d5118c74e8fefd497e5cc 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
class PersonTestCase(TestCase): | |
def test_should_return_attributes(self): | |
fields = ('first_name', 'last_name', 'age') | |
for field in fields: | |
with self.subTest(): | |
self.assertTrue(hasattr(Person, field)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@moacirmoda também tomo esse cuidado, otimizar de maneira purista pode dificultar a legibilidade e o entendimento.
@rfdeoliveira facilitar além de facilitar na mensagem de falha.