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

fijal at codespeak.net fijal at codespeak.net
Mon Mar 5 10:09:49 CET 2007


Author: fijal
Date: Mon Mar  5 10:09:47 2007
New Revision: 39934

Modified:
   pypy/dist/pypy/translator/js/examples/console/test/test_console.py
   pypy/dist/pypy/translator/js/examples/test/test_examples.py
Log:
Make tests aware of import problems with greensock2


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	Mon Mar  5 10:09:47 2007
@@ -1,6 +1,10 @@
 
 def test_line_skip():
-    from pypy.translator.js.examples.console.console import line_split
+    try:
+        from pypy.translator.js.examples.console.console import line_split
+    except ImportError:
+        import py
+        py.test.skip("cannot import greensock")
 
     assert line_split("asdf", 80) == "asdf"
     assert line_split("a b c d", 3) == "a b\n c d"

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	Mon Mar  5 10:09:47 2007
@@ -16,7 +16,12 @@
     assert rpython2javascript(start_bnb, ['bnb'], use_pdb=False)
 
 def test_overmind_build():
-    from pypy.translator.js.examples import overmind, over_client
+    try:
+        from pypy.translator.js.examples import overmind, over_client
+    except ImportError:
+        import py
+        py.test.skip("greensock wasn't found")
+        
     assert rpython2javascript(over_client, overmind.FUNCTION_LIST,
                               use_pdb=False)
 
@@ -30,6 +35,7 @@
     try:
         from pypy.translator.js.examples.console import console, client
     except ImportError:
+        import py
         py.test.skip("greensock wasn't found")
 
     assert rpython2javascript(client, console.FUNCTION_LIST,



More information about the Pypy-commit mailing list