I'm sick of these deprecations warnings in test_os
This commit is contained in:
parent
5539c78391
commit
1f01cd013f
|
@ -505,9 +505,11 @@ class URandomTests (unittest.TestCase):
|
||||||
self.assertEqual(len(os.urandom(100)), 100)
|
self.assertEqual(len(os.urandom(100)), 100)
|
||||||
self.assertEqual(len(os.urandom(1000)), 1000)
|
self.assertEqual(len(os.urandom(1000)), 1000)
|
||||||
# see http://bugs.python.org/issue3708
|
# see http://bugs.python.org/issue3708
|
||||||
self.assertEqual(len(os.urandom(0.9)), 0)
|
with test_support.check_warnings():
|
||||||
self.assertEqual(len(os.urandom(1.1)), 1)
|
# silence deprecation warnings about float arguments
|
||||||
self.assertEqual(len(os.urandom(2.0)), 2)
|
self.assertEqual(len(os.urandom(0.9)), 0)
|
||||||
|
self.assertEqual(len(os.urandom(1.1)), 1)
|
||||||
|
self.assertEqual(len(os.urandom(2.0)), 2)
|
||||||
except NotImplementedError:
|
except NotImplementedError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue