r4872 - in developers/charlie/Tests/Python: . import

charlie at docs.openmoko.org charlie at docs.openmoko.org
Tue Dec 16 07:41:58 CET 2008


Author: charlie
Date: 2008-12-16 07:41:54 +0100 (Tue, 16 Dec 2008)
New Revision: 4872

Added:
   developers/charlie/Tests/Python/import/
   developers/charlie/Tests/Python/import/module1.py
   developers/charlie/Tests/Python/import/module2.py
   developers/charlie/Tests/Python/import/test.py
Log:
Add python import tests scripts


Added: developers/charlie/Tests/Python/import/module1.py
===================================================================
--- developers/charlie/Tests/Python/import/module1.py	                        (rev 0)
+++ developers/charlie/Tests/Python/import/module1.py	2008-12-16 06:41:54 UTC (rev 4872)
@@ -0,0 +1,5 @@
+
+import time
+print "wait 5 sec from module2"
+time.sleep(5)
+print "module2 finished importing"

Added: developers/charlie/Tests/Python/import/module2.py
===================================================================
--- developers/charlie/Tests/Python/import/module2.py	                        (rev 0)
+++ developers/charlie/Tests/Python/import/module2.py	2008-12-16 06:41:54 UTC (rev 4872)
@@ -0,0 +1,5 @@
+
+import time
+print "wait 5 sec from module1"
+time.sleep(5)
+print "module1 finished importing"

Added: developers/charlie/Tests/Python/import/test.py
===================================================================
--- developers/charlie/Tests/Python/import/test.py	                        (rev 0)
+++ developers/charlie/Tests/Python/import/test.py	2008-12-16 06:41:54 UTC (rev 4872)
@@ -0,0 +1,16 @@
+#!/usr/bin/python
+
+from threading import Thread
+import time
+
+def load1():
+    import module1
+
+def load2():
+    import module2
+
+t1 = Thread(target=load1)
+t2 = Thread(target=load2)
+
+t1.start()
+t2.start()


Property changes on: developers/charlie/Tests/Python/import/test.py
___________________________________________________________________
Name: svn:executable
   + *




More information about the commitlog mailing list