diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst index f41bab3915c..10e415b4edf 100644 --- a/Doc/library/unittest.rst +++ b/Doc/library/unittest.rst @@ -127,13 +127,13 @@ Here is a short script to test three functions from the :mod:`random` module:: def test_choice(self): element = random.choice(self.seq) - self.assertIn(element, self.seq) + self.assertTrue(element in self.seq) def test_sample(self): with self.assertRaises(ValueError): random.sample(self.seq, 20) for element in random.sample(self.seq, 5): - self.assertIn(element, self.seq) + self.assertTrue(element in self.seq) if __name__ == '__main__': unittest.main()