[Python-checkins] r72633 - in python/branches/py3k: Lib/test/test_inspect.py
r.david.murray
python-checkins at python.org
Thu May 14 18:17:50 CEST 2009
Author: r.david.murray
Date: Thu May 14 18:17:50 2009
New Revision: 72633
Log:
Merged revisions 72630 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r72630 | r.david.murray | 2009年05月14日 12:12:57 -0400 (2009年5月14日) | 3 lines
Fix test failure on Windows, and add skip check if even unicodedata
turns out not to be an external module on some other platform.
........
Modified:
python/branches/py3k/ (props changed)
python/branches/py3k/Lib/test/test_inspect.py
Modified: python/branches/py3k/Lib/test/test_inspect.py
==============================================================================
--- python/branches/py3k/Lib/test/test_inspect.py (original)
+++ python/branches/py3k/Lib/test/test_inspect.py Thu May 14 18:17:50 2009
@@ -12,7 +12,7 @@
from test import inspect_fodder2 as mod2
# C module for test_findsource_binary
-import time
+import unicodedata
# Functions tested in this suite:
# ismodule, isclass, ismethod, isfunction, istraceback, isframe, iscode,
@@ -339,9 +339,13 @@
def test_method_in_dynamic_class(self):
self.assertSourceEqual(mod2.method_in_dynamic_class, 95, 97)
+ @unittest.skipIf(
+ not hasattr(unicodedata, '__file__') or
+ unicodedata.__file__[-4:] in (".pyc", ".pyo"),
+ "unicodedata is not an external binary module")
def test_findsource_binary(self):
- self.assertRaises(IOError, inspect.getsource, time)
- self.assertRaises(IOError, inspect.findsource, time)
+ self.assertRaises(IOError, inspect.getsource, unicodedata)
+ self.assertRaises(IOError, inspect.findsource, unicodedata)
# Helper for testing classify_class_attrs.
def attrs_wo_objs(cls):
More information about the Python-checkins
mailing list