From: Raymond Hettinger Date: Sat, 4 Jan 2003 05:55:11 +0000 (+0000) Subject: Test an edge case for sample(). X-Git-Tag: v2.3c1~2596 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8ec78814c138a24038d104507879bf11df09dcce;p=python Test an edge case for sample(). --- diff --git a/Lib/test/test_random.py b/Lib/test/test_random.py index d0a2a15599..b5fe1e55a5 100644 --- a/Lib/test/test_random.py +++ b/Lib/test/test_random.py @@ -63,6 +63,7 @@ class TestBasicOps(unittest.TestCase): uniq = dict.fromkeys(s) self.assertEqual(len(uniq), k) self.failIf(None in uniq) + self.assertEqual(self.gen.sample([], 0), []) # test edge case N==k==0 def test_gauss(self): # Ensure that the seed() method initializes all the hidden state. In