[Jython-checkins] jython: Test for #1909. Thanks adorsk!
frank.wierzbicki
jython-checkins at python.org
Fri Jun 22 20:37:57 CEST 2012
http://hg.python.org/jython/rev/b8f14093bc69
changeset: 6732:b8f14093bc69
user: Frank Wierzbicki <fwierzbicki at gmail.com>
date: Fri Jun 22 11:15:12 2012 -0700
summary:
Test for #1909. Thanks adorsk!
files:
Lib/test/test_operator_jy.py | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/Lib/test/test_operator_jy.py b/Lib/test/test_operator_jy.py
--- a/Lib/test/test_operator_jy.py
+++ b/Lib/test/test_operator_jy.py
@@ -73,6 +73,19 @@
self.assertEqual(func(obj), result, '%s %s should be: %s' %
(type(obj), func.__name__, result))
+ def test_foo(self):
+ class Foo(object):
+ pass
+
+ class Bar(object):
+ pass
+
+ f = Foo()
+ f.bar = Bar()
+ f.bar.bat = 5
+
+ self.assertEqual(operator.attrgetter("bar.bat")(f), 5)
+
def test_main():
test_support.run_unittest(OperatorTestCase)
--
Repository URL: http://hg.python.org/jython
More information about the Jython-checkins
mailing list