summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_inspect.py
diff options
context:
space:
mode:
authorR. David Murray <rdmurray@bitdance.com>2009-05-14 16:17:50 (GMT)
committerR. David Murray <rdmurray@bitdance.com>2009-05-14 16:17:50 (GMT)
commitb565577aa722d8b39aa42da0384f776680c03c36 (patch)
tree393da78da1074074c704500ceacd812829b87df9 /Lib/test/test_inspect.py
parentdbe3449f22677c8b63ba3df8136a7a9390eebcdc (diff)
downloadcpython-b565577aa722d8b39aa42da0384f776680c03c36.zip
cpython-b565577aa722d8b39aa42da0384f776680c03c36.tar.gz
cpython-b565577aa722d8b39aa42da0384f776680c03c36.tar.bz2
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 (Thu, 14 May 2009) | 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. ........
Diffstat (limited to 'Lib/test/test_inspect.py')
-rw-r--r--Lib/test/test_inspect.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/Lib/test/test_inspect.py b/Lib/test/test_inspect.py
index 270ebfd..26ec953 100644
--- a/Lib/test/test_inspect.py
+++ b/Lib/test/test_inspect.py
@@ -12,7 +12,7 @@ from test import inspect_fodder as mod
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 @@ class TestBuggyCases(GetSourceBase):
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):