[Python-checkins] r68785 - python/trunk/Lib/test/test_os.py
benjamin.peterson
python-checkins at python.org
Mon Jan 19 22:08:37 CET 2009
Author: benjamin.peterson
Date: Mon Jan 19 22:08:37 2009
New Revision: 68785
Log:
I'm sick of these deprecations warnings in test_os
Modified:
python/trunk/Lib/test/test_os.py
Modified: python/trunk/Lib/test/test_os.py
==============================================================================
--- python/trunk/Lib/test/test_os.py (original)
+++ python/trunk/Lib/test/test_os.py Mon Jan 19 22:08:37 2009
@@ -505,9 +505,11 @@
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
More information about the Python-checkins
mailing list