long and descriptive names for testing functions sqrt vs test_001_square_of_negative_number_raise_value_error Use the appropriate assertion assertTrue / assertLess / assertIsInstance / assertDictEqual Order of arguments assertEqual(expected, actual) Mock with parsimony Third-party lib / HTTP call over network (mailer, api) / Randomness / heavy-load non-relevant part of code Test realistic edge cases test_is_prime({"toto": [1, 2, 3]}) vs test_is_prime(0) Unittest Best practices