Kaydet (Commit) 1f01cd01 authored tarafından Benjamin Peterson's avatar Benjamin Peterson

I'm sick of these deprecations warnings in test_os

üst 5539c783
......@@ -505,9 +505,11 @@ class URandomTests (unittest.TestCase):
self.assertEqual(len(os.urandom(100)), 100)
self.assertEqual(len(os.urandom(1000)), 1000)
# see http://bugs.python.org/issue3708
self.assertEqual(len(os.urandom(0.9)), 0)
self.assertEqual(len(os.urandom(1.1)), 1)
self.assertEqual(len(os.urandom(2.0)), 2)
with test_support.check_warnings():
# silence deprecation warnings about float arguments
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:
pass
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment