diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2011-03-10 21:38:18 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2011-03-10 21:38:18 (GMT) |
commit | c29cd9384a7ef55a6f9d212965b78584843225d9 (patch) | |
tree | 61a3f2c536d9b9315340d803807739dc39a1e5a1 /Doc | |
parent | c5425472110f69b444ae224e8fd97c14ee9fcb0f (diff) | |
download | cpython-c29cd9384a7ef55a6f9d212965b78584843225d9.zip cpython-c29cd9384a7ef55a6f9d212965b78584843225d9.tar.gz cpython-c29cd9384a7ef55a6f9d212965b78584843225d9.tar.bz2 |
Use simpler assert in basic example.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/unittest.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst index f41bab3..10e415b 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() |