[pypy-svn] r39768 - in pypy/dist/pypy/translator/js/examples: console/test test

fijal at codespeak.net fijal at codespeak.net
Sat Mar 3 11:36:39 CET 2007


Author: fijal
Date: Sat Mar  3 11:36:36 2007
New Revision: 39768

Modified:
   pypy/dist/pypy/translator/js/examples/console/test/test_console.py
   pypy/dist/pypy/translator/js/examples/console/test/test_session.py
   pypy/dist/pypy/translator/js/examples/test/test_examples.py
Log:
Add skips in a case when no greensock is found


Modified: pypy/dist/pypy/translator/js/examples/console/test/test_console.py
==============================================================================
--- pypy/dist/pypy/translator/js/examples/console/test/test_console.py	(original)
+++ pypy/dist/pypy/translator/js/examples/console/test/test_console.py	Sat Mar  3 11:36:36 2007
@@ -1,11 +1,12 @@
 
+import py
+py.test.skip("XXX")
+
 from pypy.translator.js.examples.console import console
 
 def test_run_console():
     """ Check if we can read anything
     """
-    import py
-    py.test.skip("XXX")
     pipe = console.run_console("python")
     pipe.stdin.close()
     t = False

Modified: pypy/dist/pypy/translator/js/examples/console/test/test_session.py
==============================================================================
--- pypy/dist/pypy/translator/js/examples/console/test/test_session.py	(original)
+++ pypy/dist/pypy/translator/js/examples/console/test/test_session.py	Sat Mar  3 11:36:36 2007
@@ -2,11 +2,15 @@
 """ Various tests around interpreter in a subprocess
 """
 
-from pypeers.greensock2 import autogreenlet, wait, sleep, ConnexionClosed
-from pypeers.pipe.fd import FDInput
-from pypy.translator.js.examples.console.session import Interpreter
 import py
 
+try:
+    from pypeers.greensock2 import autogreenlet, wait, sleep, ConnexionClosed
+    from pypeers.pipe.fd import FDInput
+except ImportError:
+    py.test.skip("greensock wasn't found")
+from pypy.translator.js.examples.console.session import Interpreter
+
 def test_greensock_reader_timeouter():
     i = Interpreter("python", timeout=3)
     while not i.interact().endswith(">>> "):

Modified: pypy/dist/pypy/translator/js/examples/test/test_examples.py
==============================================================================
--- pypy/dist/pypy/translator/js/examples/test/test_examples.py	(original)
+++ pypy/dist/pypy/translator/js/examples/test/test_examples.py	Sat Mar  3 11:36:36 2007
@@ -27,6 +27,10 @@
 
     
 def test_console_2_build():
-    from pypy.translator.js.examples.console import console, client
+    try:
+        from pypy.translator.js.examples.console import console, client
+    except ImportError:
+        py.test.skip("greensock wasn't found")
+
     assert rpython2javascript(client, console.FUNCTION_LIST,
                               use_pdb=False)



More information about the Pypy-commit mailing list