summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_gettext.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/Lib/test/test_gettext.py b/Lib/test/test_gettext.py
index a852443..7bfe747 100644
--- a/Lib/test/test_gettext.py
+++ b/Lib/test/test_gettext.py
@@ -443,9 +443,12 @@ class PluralFormsTestCase(GettextBaseTest):
f = gettext.c2py('n != 1')
self.assertEqual(f(1), 0)
self.assertEqual(f(2), 1)
- self.assertEqual(f(1.0), 0)
- self.assertEqual(f(2.0), 1)
- self.assertEqual(f(1.1), 1)
+ with self.assertWarns(DeprecationWarning):
+ self.assertEqual(f(1.0), 0)
+ with self.assertWarns(DeprecationWarning):
+ self.assertEqual(f(2.0), 1)
+ with self.assertWarns(DeprecationWarning):
+ self.assertEqual(f(1.1), 1)
self.assertRaises(TypeError, f, '2')
self.assertRaises(TypeError, f, b'2')
self.assertRaises(TypeError, f, [])