diff options
author | Raymond Hettinger <python@rcn.com> | 2003-01-04 05:55:11 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2003-01-04 05:55:11 (GMT) |
commit | 8ec78814c138a24038d104507879bf11df09dcce (patch) | |
tree | 2d9f59eb12b03545d0ff448f0ea28a676f879526 | |
parent | 8b9aa8dbba644da23ce8417f2d30b218392b3282 (diff) | |
download | cpython-8ec78814c138a24038d104507879bf11df09dcce.zip cpython-8ec78814c138a24038d104507879bf11df09dcce.tar.gz cpython-8ec78814c138a24038d104507879bf11df09dcce.tar.bz2 |
Test an edge case for sample().
-rw-r--r-- | Lib/test/test_random.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_random.py b/Lib/test/test_random.py index d0a2a15..b5fe1e5 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 |