def test_find_one_duplicate(self): self.assertEqual(duplicates.dups([1, 1, 3]), [1]) self.assertEqual(duplicates.dups([1, 4, 5, 4, 3]), [4])
def test_handles_non_integer_in_list(self): self.assertRaises(TypeError, duplicates.dups([1, '2', 3]))
def test_find_multiple_duplicates(self): self.assertEqual(duplicates.dups([5, 4, 4, 5, 5]), [4, 5, 5])
def test_returns_empty_array_for_no_duplicates(self): self.assertEqual(duplicates.dups([1, 2, 3]), [])
def test_find_multiple_of_same_duplicate(self): self.assertEqual(duplicates.dups([5, 4, 3, 5, 5]), [5, 5])