UserString.MutableString has been removed in Python 3.0.

Works on issue #2877. Thanks Quentin Gallet-Gilles for the patch.
This commit is contained in:
Brett Cannon 2008-05-29 05:08:50 +00:00
parent 5ec330cb2f
commit abb34fe9f3
5 changed files with 22 additions and 2 deletions

View file

@ -219,6 +219,14 @@ class TestStdlibRemovals(unittest.TestCase):
func = getattr(commands, name)
self.assertRaises(DeprecationWarning, func, *([None]*arg_count))
def test_mutablestring_removal(self):
# UserString.MutableString has been removed in 3.0.
import UserString
with catch_warning(record=False):
warnings.filterwarnings("error", ".*MutableString",
DeprecationWarning)
self.assertRaises(DeprecationWarning, UserString.MutableString)
def test_main():
with catch_warning(record=True):