Silence py3k warning claiming to affect the random module
This commit is contained in:
parent
9b4e5820cb
commit
b844ef7950
|
@ -52,10 +52,12 @@ class TestBasicOps(unittest.TestCase):
|
|||
state3 = self.gen.getstate() # s/b distinct from state2
|
||||
self.assertNotEqual(state2, state3)
|
||||
|
||||
self.assertRaises(TypeError, self.gen.jumpahead) # needs an arg
|
||||
self.assertRaises(TypeError, self.gen.jumpahead, "ick") # wrong type
|
||||
self.assertRaises(TypeError, self.gen.jumpahead, 2.3) # wrong type
|
||||
self.assertRaises(TypeError, self.gen.jumpahead, 2, 3) # too many
|
||||
# Silence py3k warnings
|
||||
with test_support.check_warnings():
|
||||
self.assertRaises(TypeError, self.gen.jumpahead) # needs an arg
|
||||
self.assertRaises(TypeError, self.gen.jumpahead, "ick") # wrong type
|
||||
self.assertRaises(TypeError, self.gen.jumpahead, 2.3) # wrong type
|
||||
self.assertRaises(TypeError, self.gen.jumpahead, 2, 3) # too many
|
||||
|
||||
def test_sample(self):
|
||||
# For the entire allowable range of 0 <= k <= N, validate that
|
||||
|
|
Loading…
Reference in New Issue