diff options
author | Walter Dörwald <walter@livinglogic.de> | 2007-06-11 21:38:39 (GMT) |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2007-06-11 21:38:39 (GMT) |
commit | 5de48bdd195b14426c772b4c61290aef7f33e3ec (patch) | |
tree | e4411088f62f76b183b18d543b4c4b64d4076d65 /Lib/test/test_cfgparser.py | |
parent | 80bfb725af0809308264d526ac6a024fc8386643 (diff) | |
download | cpython-5de48bdd195b14426c772b4c61290aef7f33e3ec.zip cpython-5de48bdd195b14426c772b4c61290aef7f33e3ec.tar.gz cpython-5de48bdd195b14426c772b4c61290aef7f33e3ec.tar.bz2 |
Simplify various spots where: str() is called on something
that already is a string or the existence of the str class
is checked or a check is done for str twice. These all stem
from the initial unicode->str replacement.
Diffstat (limited to 'Lib/test/test_cfgparser.py')
-rw-r--r-- | Lib/test/test_cfgparser.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/Lib/test/test_cfgparser.py b/Lib/test/test_cfgparser.py index 360998e..076de4a 100644 --- a/Lib/test/test_cfgparser.py +++ b/Lib/test/test_cfgparser.py @@ -247,13 +247,8 @@ class TestCaseBase(unittest.TestCase): cf.set("sect", "option1", mystr("splat")) cf.set("sect", "option2", "splat") cf.set("sect", "option2", mystr("splat")) - try: - str - except NameError: - pass - else: - cf.set("sect", "option1", str("splat")) - cf.set("sect", "option2", str("splat")) + cf.set("sect", "option1", "splat") + cf.set("sect", "option2", "splat") def test_read_returns_file_list(self): file1 = test_support.findfile("cfgparser.1") |