summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_sys.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-12-02 09:40:06 (GMT)
committerGeorg Brandl <georg@python.org>2007-12-02 09:40:06 (GMT)
commit1a3284ed69d545e4ef59869998cb8c29233a45fa (patch)
tree98728a9b7aae6188ee8124160007a9d5c5277f8c /Lib/test/test_sys.py
parent87f9c53937ce47f55851ac7c71a94e46cf9142bf (diff)
downloadcpython-1a3284ed69d545e4ef59869998cb8c29233a45fa.zip
cpython-1a3284ed69d545e4ef59869998cb8c29233a45fa.tar.gz
cpython-1a3284ed69d545e4ef59869998cb8c29233a45fa.tar.bz2
#1535: rename __builtin__ module to builtins.
Diffstat (limited to 'Lib/test/test_sys.py')
-rw-r--r--Lib/test/test_sys.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py
index 767f3a8..435a696 100644
--- a/Lib/test/test_sys.py
+++ b/Lib/test/test_sys.py
@@ -15,22 +15,22 @@ class SysModuleTest(unittest.TestCase):
sys.displayhook = self.orig_displayhook
def test_original_displayhook(self):
- import __builtin__
+ import builtins
out = io.StringIO()
sys.stdout = out
dh = sys.__displayhook__
self.assertRaises(TypeError, dh)
- if hasattr(__builtin__, "_"):
- del __builtin__._
+ if hasattr(builtins, "_"):
+ del builtins._
dh(None)
self.assertEqual(out.getvalue(), "")
- self.assert_(not hasattr(__builtin__, "_"))
+ self.assert_(not hasattr(builtins, "_"))
dh(42)
self.assertEqual(out.getvalue(), "42\n")
- self.assertEqual(__builtin__._, 42)
+ self.assertEqual(builtins._, 42)
del sys.stdout
self.assertRaises(RuntimeError, dh, 42)