summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_inspect.py
diff options
context:
space:
mode:
authorAlexander Belopolsky <alexander.belopolsky@gmail.com>2010-12-01 20:05:49 (GMT)
committerAlexander Belopolsky <alexander.belopolsky@gmail.com>2010-12-01 20:05:49 (GMT)
commit41e422a4ffd2c9ce778b1d03180b4aa758dc6fc9 (patch)
treeb24f8dd2394482f6d8dc491d1afb908b792b3354 /Lib/test/test_inspect.py
parent419e3de3734edfec1aa04a3123e53199193a0bed (diff)
downloadcpython-41e422a4ffd2c9ce778b1d03180b4aa758dc6fc9.zip
cpython-41e422a4ffd2c9ce778b1d03180b4aa758dc6fc9.tar.gz
cpython-41e422a4ffd2c9ce778b1d03180b4aa758dc6fc9.tar.bz2
Issue #4113: Added custom __repr__ method to functools.partial.
Diffstat (limited to 'Lib/test/test_inspect.py')
-rw-r--r--Lib/test/test_inspect.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_inspect.py b/Lib/test/test_inspect.py
index 71f0e8a..b322f7d 100644
--- a/Lib/test/test_inspect.py
+++ b/Lib/test/test_inspect.py
@@ -12,6 +12,7 @@ from test.support import run_unittest
from test import inspect_fodder as mod
from test import inspect_fodder2 as mod2
+from test import inspect_fodder3 as mod3
# C module for test_findsource_binary
import unicodedata
@@ -388,6 +389,12 @@ class TestBuggyCases(GetSourceBase):
self.assertEqual(inspect.findsource(co), (lines,0))
self.assertEqual(inspect.getsource(co), lines[0])
+class TestNoEOF(GetSourceBase):
+ fodderFile = mod3
+
+ def test_class(self):
+ self.assertSourceEqual(mod3.X, 1, 2)
+
# Helper for testing classify_class_attrs.
def attrs_wo_objs(cls):
return [t[:3] for t in inspect.classify_class_attrs(cls)]