From 8ec78814c138a24038d104507879bf11df09dcce Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Sat, 4 Jan 2003 05:55:11 +0000 Subject: [PATCH] Test an edge case for sample(). --- Lib/test/test_random.py | 1 + 1 file changed, 1 insertion(+) 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 -- 2.50.1