[Zope-Checkins] CVS: Zope3/lib/python/Persistence/tests - testModule.py:1.9

Jeremy Hylton jeremy@zope.com
Wed, 3 Jul 2002 17:12:55 -0400


Update of /cvs-repository/Zope3/lib/python/Persistence/tests
In directory cvs.zope.org:/tmp/cvs-serv12990

Modified Files:
	testModule.py 
Log Message:
checkin commented out tests that would fail if they were enabled.


=== Zope3/lib/python/Persistence/tests/testModule.py 1.8 => 1.9 ===
     return len(x)
 """
+nested_src = """def f(x):
+    def g(y):
+        return x + y
+    return g
+
+g = f(3)
+"""
+
 
 class TestModule(unittest.TestCase):
 
@@ -123,6 +131,20 @@
         self.assertEqual(test.f(), len(test.x))
         test._p_deactivate()
         self.assertEqual(test.f(), len(test.x))
+
+##    def testNested(self):
+##        self.importer.module_from_source("nested", nested_src)
+##        get_transaction().commit()
+##        import nested
+##        self.assertEqual(nested.g(5), 8)
+
+##    def testLambda(self):
+##        # test a lambda that contains another lambda as a default
+##        src = "f = lambda x, y = lambda: 1: x + y()"
+##        self.importer.module_from_source("test", src)
+##        get_transaction().commit()
+##        import test
+##        self.assertEqaul(test.f(1), 2)
 
 def test_suite():
     return unittest.makeSuite(TestModule)