diff options
Diffstat (limited to 'Lib/test/test_array.py')
-rw-r--r-- | Lib/test/test_array.py | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/Lib/test/test_array.py b/Lib/test/test_array.py index c2439579e8e..5f612fba8a4 100644 --- a/Lib/test/test_array.py +++ b/Lib/test/test_array.py @@ -426,26 +426,6 @@ class BaseTest: b.fromlist(a.tolist()) self.assertEqual(a, b) - def test_tofromstring(self): - # Warnings not raised when arguments are incorrect as Argument Clinic - # handles that before the warning can be raised. - nb_warnings = 2 - with warnings.catch_warnings(record=True) as r: - warnings.filterwarnings("always", - message=r"(to|from)string\(\) is deprecated", - category=DeprecationWarning) - a = array.array(self.typecode, 2*self.example) - b = array.array(self.typecode) - self.assertRaises(TypeError, a.tostring, 42) - self.assertRaises(TypeError, b.fromstring) - self.assertRaises(TypeError, b.fromstring, 42) - b.fromstring(a.tostring()) - self.assertEqual(a, b) - if a.itemsize>1: - self.assertRaises(ValueError, b.fromstring, "x") - nb_warnings += 1 - self.assertEqual(len(r), nb_warnings) - def test_tofrombytes(self): a = array.array(self.typecode, 2*self.example) b = array.array(self.typecode) |