From: <fwi...@us...> - 2008-10-16 16:18:13
|
Revision: 5432 http://jython.svn.sourceforge.net/jython/?rev=5432&view=rev Author: fwierzbicki Date: 2008-10-16 16:18:04 +0000 (Thu, 16 Oct 2008) Log Message: ----------- move test124 to test_jy_internals. Modified Paths: -------------- trunk/jython/Lib/test/test_jy_internals.py Removed Paths: ------------- trunk/jython/bugtests/test124.py Modified: trunk/jython/Lib/test/test_jy_internals.py =================================================================== --- trunk/jython/Lib/test/test_jy_internals.py 2008-10-16 16:13:52 UTC (rev 5431) +++ trunk/jython/Lib/test/test_jy_internals.py 2008-10-16 16:18:04 UTC (rev 5432) @@ -226,6 +226,17 @@ foo() Bar().baz() +class ModuleTest(unittest.TestCase): + def test_create_module(self): + from org.python.core import PyModule, PyInstance + test = PyModule("test", {}) + exec "a = 2" in test.__dict__ + self.assertEquals(len(test.__dict__), 3) + + #test = PyInstance.__tojava__(test, PyModule) + exec "b = 3" in test.__dict__ + self.assertEquals(len(test.__dict__), 4) + def test_main(): test_suite = unittest.TestSuite() test_loader = unittest.TestLoader() @@ -237,6 +248,7 @@ suite_add(DatetimeTypeMappingTest) suite_add(IdTest) suite_add(FrameTest) + suite_add(ModuleTest) run_suite(test_suite) if __name__ == "__main__": Deleted: trunk/jython/bugtests/test124.py =================================================================== --- trunk/jython/bugtests/test124.py 2008-10-16 16:13:52 UTC (rev 5431) +++ trunk/jython/bugtests/test124.py 2008-10-16 16:18:04 UTC (rev 5432) @@ -1,14 +0,0 @@ -""" -Create a new Module. -""" - -import support - -from org.python.core import PyModule, PyInstance -test = PyModule("test", {}) -exec "a = 2" in test.__dict__ -support.compare(len(test.__dict__), "3") - -#test = PyInstance.__tojava__(test, PyModule) -exec "b = 3" in test.__dict__ -support.compare(len(test.__dict__), "4") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |