summaryrefslogtreecommitdiff
path: root/Lib/test/test_pep352.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-12-02 09:40:06 +0000
committerGeorg Brandl <georg@python.org>2007-12-02 09:40:06 +0000
commit1a3284ed69d545e4ef59869998cb8c29233a45fa (patch)
tree98728a9b7aae6188ee8124160007a9d5c5277f8c /Lib/test/test_pep352.py
parent87f9c53937ce47f55851ac7c71a94e46cf9142bf (diff)
downloadcpython-git-1a3284ed69d545e4ef59869998cb8c29233a45fa.tar.gz
#1535: rename __builtin__ module to builtins.
Diffstat (limited to 'Lib/test/test_pep352.py')
-rw-r--r--Lib/test/test_pep352.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_pep352.py b/Lib/test/test_pep352.py
index ddeee1a1b7..db117ef2a8 100644
--- a/Lib/test/test_pep352.py
+++ b/Lib/test/test_pep352.py
@@ -1,5 +1,5 @@
import unittest
-import __builtin__
+import builtins
import warnings
from test.test_support import run_unittest
import os
@@ -23,7 +23,7 @@ class ExceptionClassTests(unittest.TestCase):
def test_inheritance(self):
# Make sure the inheritance hierarchy matches the documentation
exc_set = set()
- for object_ in __builtin__.__dict__.values():
+ for object_ in builtins.__dict__.values():
try:
if issubclass(object_, BaseException):
exc_set.add(object_.__name__)
@@ -35,7 +35,7 @@ class ExceptionClassTests(unittest.TestCase):
try:
superclass_name = inheritance_tree.readline().rstrip()
try:
- last_exc = getattr(__builtin__, superclass_name)
+ last_exc = getattr(builtins, superclass_name)
except AttributeError:
self.fail("base class %s not a built-in" % superclass_name)
self.failUnless(superclass_name in exc_set,
@@ -58,7 +58,7 @@ class ExceptionClassTests(unittest.TestCase):
left_bracket = exc_name.index('[')
exc_name = exc_name[:left_bracket-1] # cover space
try:
- exc = getattr(__builtin__, exc_name)
+ exc = getattr(builtins, exc_name)
except AttributeError:
self.fail("%s not a built-in exception" % exc_name)
if last_depth < depth: