summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_os.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-01-19 21:08:37 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-01-19 21:08:37 (GMT)
commit1f01cd013ff153b92dc7fed13ace419a5d024da7 (patch)
treeb6b3e06275069aa6a0f2f2c48a24c51026ab5a5b /Lib/test/test_os.py
parent5539c783912d1cc84d9df16322e1083866ad2033 (diff)
downloadcpython-1f01cd013ff153b92dc7fed13ace419a5d024da7.zip
cpython-1f01cd013ff153b92dc7fed13ace419a5d024da7.tar.gz
cpython-1f01cd013ff153b92dc7fed13ace419a5d024da7.tar.bz2
I'm sick of these deprecations warnings in test_os
Diffstat (limited to 'Lib/test/test_os.py')
-rw-r--r--Lib/test/test_os.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index cd310ea..81d1671 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -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