mirror of https://github.com/python/cpython
Fix deprecation warnings in test_os.py
This commit is contained in:
parent
192f6782c6
commit
aad1541484
|
@ -500,6 +500,8 @@ class DevNullTests (unittest.TestCase):
|
|||
class URandomTests (unittest.TestCase):
|
||||
def test_urandom(self):
|
||||
try:
|
||||
with test_support._check_py3k_warnings(
|
||||
('integer argument expected, got float', DeprecationWarning)):
|
||||
self.assertEqual(len(os.urandom(1)), 1)
|
||||
self.assertEqual(len(os.urandom(10)), 10)
|
||||
self.assertEqual(len(os.urandom(100)), 100)
|
||||
|
|
Loading…
Reference in New Issue