diff --git a/iniparse/configparser.py b/iniparse/configparser.py index c543d50..e39fe63 100644 --- a/iniparse/configparser.py +++ b/iniparse/configparser.py @@ -1,7 +1,2 @@ -try: - from ConfigParser import * - # not all objects get imported with __all__ - from ConfigParser import Error, InterpolationMissingOptionError -except ImportError: - from configparser import * - from configparser import Error, InterpolationMissingOptionError +from configparser import * +from configparser import Error, InterpolationMissingOptionError diff --git a/runtests.py b/runtests.py index 53a723d..1619714 100755 --- a/runtests.py +++ b/runtests.py @@ -1,12 +1,8 @@ #!/usr/bin/env python -import sys import tests + if __name__ == '__main__': - if len(sys.argv) == 2 and sys.argv[1] == '-g': - import unittestgui - unittestgui.main('tests.Suite') - else: - import unittest - unittest.main(defaultTest='tests.Suite') + import unittest + unittest.main(defaultTest='tests.Suite') diff --git a/tests/test_compat.py b/tests/test_compat.py index 253ac40..8d7c785 100644 --- a/tests/test_compat.py +++ b/tests/test_compat.py @@ -6,11 +6,7 @@ import collections as UserDict import unittest -import sys -if sys.version_info[0] < 3: - from test import test_support -else: - from test import support as test_support +from test import support as test_support class SortedDict(UserDict.UserDict): @@ -264,13 +260,6 @@ class mystr(str): cf.set("sect", "option1", mystr("splat")) cf.set("sect", "option2", "splat") cf.set("sect", "option2", mystr("splat")) - try: - unicode - except NameError: - pass - else: - cf.set("sect", "option1", unicode("splat")) - cf.set("sect", "option2", unicode("splat")) def test_read_returns_file_list(self): file1 = test_support.findfile("cfgparser.1")