summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-12-14 19:07:09 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-12-14 19:07:09 (GMT)
commitc836a28cc1bf6c0dcbcf9c30f47b731943e21b60 (patch)
tree98031c255e283b43c359e3528c6eef8e602dd25c /Lib/test
parent84d28b4ee5983bcb048323a0e56ea4c5498a0652 (diff)
downloadcpython-c836a28cc1bf6c0dcbcf9c30f47b731943e21b60.zip
cpython-c836a28cc1bf6c0dcbcf9c30f47b731943e21b60.tar.gz
cpython-c836a28cc1bf6c0dcbcf9c30f47b731943e21b60.tar.bz2
Issue #17576: Removed deprecation warnings added in changeset 618cca51a27e.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_getargs2.py24
-rw-r--r--Lib/test/test_index.py3
-rw-r--r--Lib/test/test_int.py9
3 files changed, 12 insertions, 24 deletions
diff --git a/Lib/test/test_getargs2.py b/Lib/test/test_getargs2.py
index 79eb639..715b5c6 100644
--- a/Lib/test/test_getargs2.py
+++ b/Lib/test/test_getargs2.py
@@ -75,8 +75,7 @@ class Unsigned_TestCase(unittest.TestCase):
self.assertEqual(99, getargs_b(Int()))
self.assertEqual(0, getargs_b(IntSubclass()))
self.assertRaises(TypeError, getargs_b, BadInt())
- with self.assertWarns(DeprecationWarning):
- self.assertEqual(1, getargs_b(BadInt2()))
+ self.assertEqual(1, getargs_b(BadInt2()))
self.assertEqual(0, getargs_b(BadInt3()))
self.assertRaises(OverflowError, getargs_b, -1)
@@ -94,8 +93,7 @@ class Unsigned_TestCase(unittest.TestCase):
self.assertEqual(99, getargs_B(Int()))
self.assertEqual(0, getargs_B(IntSubclass()))
self.assertRaises(TypeError, getargs_B, BadInt())
- with self.assertWarns(DeprecationWarning):
- self.assertEqual(1, getargs_B(BadInt2()))
+ self.assertEqual(1, getargs_B(BadInt2()))
self.assertEqual(0, getargs_B(BadInt3()))
self.assertEqual(UCHAR_MAX, getargs_B(-1))
@@ -113,8 +111,7 @@ class Unsigned_TestCase(unittest.TestCase):
self.assertEqual(99, getargs_H(Int()))
self.assertEqual(0, getargs_H(IntSubclass()))
self.assertRaises(TypeError, getargs_H, BadInt())
- with self.assertWarns(DeprecationWarning):
- self.assertEqual(1, getargs_H(BadInt2()))
+ self.assertEqual(1, getargs_H(BadInt2()))
self.assertEqual(0, getargs_H(BadInt3()))
self.assertEqual(USHRT_MAX, getargs_H(-1))
@@ -133,8 +130,7 @@ class Unsigned_TestCase(unittest.TestCase):
self.assertEqual(99, getargs_I(Int()))
self.assertEqual(0, getargs_I(IntSubclass()))
self.assertRaises(TypeError, getargs_I, BadInt())
- with self.assertWarns(DeprecationWarning):
- self.assertEqual(1, getargs_I(BadInt2()))
+ self.assertEqual(1, getargs_I(BadInt2()))
self.assertEqual(0, getargs_I(BadInt3()))
self.assertEqual(UINT_MAX, getargs_I(-1))
@@ -174,8 +170,7 @@ class Signed_TestCase(unittest.TestCase):
self.assertEqual(99, getargs_h(Int()))
self.assertEqual(0, getargs_h(IntSubclass()))
self.assertRaises(TypeError, getargs_h, BadInt())
- with self.assertWarns(DeprecationWarning):
- self.assertEqual(1, getargs_h(BadInt2()))
+ self.assertEqual(1, getargs_h(BadInt2()))
self.assertEqual(0, getargs_h(BadInt3()))
self.assertRaises(OverflowError, getargs_h, SHRT_MIN-1)
@@ -193,8 +188,7 @@ class Signed_TestCase(unittest.TestCase):
self.assertEqual(99, getargs_i(Int()))
self.assertEqual(0, getargs_i(IntSubclass()))
self.assertRaises(TypeError, getargs_i, BadInt())
- with self.assertWarns(DeprecationWarning):
- self.assertEqual(1, getargs_i(BadInt2()))
+ self.assertEqual(1, getargs_i(BadInt2()))
self.assertEqual(0, getargs_i(BadInt3()))
self.assertRaises(OverflowError, getargs_i, INT_MIN-1)
@@ -212,8 +206,7 @@ class Signed_TestCase(unittest.TestCase):
self.assertEqual(99, getargs_l(Int()))
self.assertEqual(0, getargs_l(IntSubclass()))
self.assertRaises(TypeError, getargs_l, BadInt())
- with self.assertWarns(DeprecationWarning):
- self.assertEqual(1, getargs_l(BadInt2()))
+ self.assertEqual(1, getargs_l(BadInt2()))
self.assertEqual(0, getargs_l(BadInt3()))
self.assertRaises(OverflowError, getargs_l, LONG_MIN-1)
@@ -254,8 +247,7 @@ class LongLong_TestCase(unittest.TestCase):
self.assertEqual(99, getargs_L(Int()))
self.assertEqual(0, getargs_L(IntSubclass()))
self.assertRaises(TypeError, getargs_L, BadInt())
- with self.assertWarns(DeprecationWarning):
- self.assertEqual(1, getargs_L(BadInt2()))
+ self.assertEqual(1, getargs_L(BadInt2()))
self.assertEqual(0, getargs_L(BadInt3()))
self.assertRaises(OverflowError, getargs_L, LLONG_MIN-1)
diff --git a/Lib/test/test_index.py b/Lib/test/test_index.py
index a2ac321..8785711 100644
--- a/Lib/test/test_index.py
+++ b/Lib/test/test_index.py
@@ -81,8 +81,7 @@ class BaseTestCase(unittest.TestCase):
return True
bad_int = BadInt()
- with self.assertWarns(DeprecationWarning):
- n = operator.index(bad_int)
+ n = operator.index(bad_int)
self.assertEqual(n, 1)
bad_int = BadInt2()
diff --git a/Lib/test/test_int.py b/Lib/test/test_int.py
index a4487bc..c489510 100644
--- a/Lib/test/test_int.py
+++ b/Lib/test/test_int.py
@@ -359,18 +359,15 @@ class IntTestCases(unittest.TestCase):
return True
bad_int = BadInt()
- with self.assertWarns(DeprecationWarning):
- n = int(bad_int)
+ n = int(bad_int)
self.assertEqual(n, 1)
bad_int = BadInt2()
- with self.assertWarns(DeprecationWarning):
- n = int(bad_int)
+ n = int(bad_int)
self.assertEqual(n, 1)
bad_int = TruncReturnsBadInt()
- with self.assertWarns(DeprecationWarning):
- n = int(bad_int)
+ n = int(bad_int)
self.assertEqual(n, 1)
good_int = TruncReturnsIntSubclass()