Author: Anton Gulenko <anton.gule...@googlemail.com>
Branch: rstrategies
Changeset: r1041:63ab8de4343a
Date: 2014-08-20 17:48 +0200
http://bitbucket.org/pypy/lang-smalltalk/changeset/63ab8de4343a/

Log:    Merged

diff --git a/spyvm/test/conftest.py b/spyvm/test/conftest.py
--- a/spyvm/test/conftest.py
+++ b/spyvm/test/conftest.py
@@ -3,28 +3,28 @@
 def pytest_addoption(parser):
     group = parser.getgroup("RSqueak test options")
     group.addoption(
+        "--quick", "-Q",
+        dest="execute-quick-tests",
+        action="store_false",
+        default=True,
+        help="Only execute quick tests (no image loading or long execution)"
+    )
+    group.addoption(
         "--slow", "-S",
         dest="execute-slow-tests",
         action="store_true",
         default=False,
-        help="Additionally execute slow tests (loading full Squeak image or 
long execution)"
-    )
-    group.addoption(
-        "--all", "-A",
-        dest="execute-all-tests",
-        action="store_true",
-        default=False,
-        help="Execute all tests"
+        help="Execute all tests (including very slow tests)"
     )
     group.addoption(
         "--jit",
         dest="rsqueak-binary",
         action="store",
         default=None,
-        help="Path to a compiled rsqueak binary"
+        help="Path to a compiled rsqueak binary. Enables jit tests."
     )
 
-# The 'spy' parameter is used in tests under jittest/
+# The 'jit' parameter is used in tests under jittest/
 def pytest_funcarg__spy(request):
     val = request.config.getvalue("rsqueak-binary")
     if not val:
diff --git a/spyvm/test/test_bootstrappedimage.py 
b/spyvm/test/test_bootstrappedimage.py
--- a/spyvm/test/test_bootstrappedimage.py
+++ b/spyvm/test/test_bootstrappedimage.py
@@ -1,5 +1,5 @@
 import py
-from .util import read_image, copy_to_module, cleanup_module, slow_test, 
very_slow_test
+from .util import read_image, copy_to_module, cleanup_module, very_slow_test
 
 def setup_module():
     space, interp, image, reader = read_image("bootstrapped.image")
@@ -16,15 +16,6 @@
 
 @very_slow_test
 def test_retrieve_symbol():
-    """asSymbol
-    "This is the only place that new Symbols are created. A Symbol is created
-    if and only if there is not already a Symbol with its contents in 
existance."
-    Symbol
-        allInstancesDo: [ :sym |
-            self = sym
-                ifTrue: [ ^ sym ] ].
-    ^ (Symbol basicNew: self size) initFrom: self"""
-    
     space.initialize_class(space.w_String, interp)
     w_result = perform(w("someString"), "asSymbol")
     assert w_result.as_string() == "someString"
diff --git a/spyvm/test/test_largeinteger.py b/spyvm/test/test_largeinteger.py
--- a/spyvm/test/test_largeinteger.py
+++ b/spyvm/test/test_largeinteger.py
@@ -1,7 +1,7 @@
 import operator
 from spyvm import model, constants, primitives
 from spyvm.test.test_primitives import MockFrame
-from .util import read_image, copy_to_module, cleanup_module, slow_test
+from .util import read_image, copy_to_module, cleanup_module
 from rpython.rlib.rarithmetic import intmask, r_uint
 
 def setup_module():
diff --git a/spyvm/test/test_miniimage.py b/spyvm/test/test_miniimage.py
--- a/spyvm/test/test_miniimage.py
+++ b/spyvm/test/test_miniimage.py
@@ -1,6 +1,8 @@
 import py, math
 from spyvm import model, constants, storage_contexts, wrapper, primitives, 
interpreter, error
-from .util import read_image, open_reader, copy_to_module, cleanup_module, 
TestInterpreter, very_slow_test
+from .util import read_image, open_reader, copy_to_module, cleanup_module, 
TestInterpreter, slow_test, very_slow_test
+
+pytestmark = slow_test
 
 def setup_module():
     space, interp, image, reader = read_image("mini.image")
diff --git a/spyvm/test/test_miniimage_compiling.py 
b/spyvm/test/test_miniimage_compiling.py
--- a/spyvm/test/test_miniimage_compiling.py
+++ b/spyvm/test/test_miniimage_compiling.py
@@ -1,6 +1,8 @@
 import py, math
 from spyvm import model, constants, storage_contexts, wrapper, primitives, 
interpreter, error
-from .util import read_image, open_reader, copy_to_module, cleanup_module, 
TestInterpreter, slow_test
+from .util import read_image, open_reader, copy_to_module, cleanup_module, 
TestInterpreter, slow_test, very_slow_test
+
+pytestmark = slow_test
 
 def setup_module():
     space, interp, _, _ = read_image("mini.image")
@@ -19,7 +21,7 @@
 def test_load_image():
     pass
 
-@slow_test
+@very_slow_test
 def test_compile_method():
     sourcecode = """fib
                         ^self < 2
@@ -28,7 +30,7 @@
     perform(w(10).getclass(space), "compile:classified:notifying:", 
w(sourcecode), w('pypy'), w(None))
     assert perform(w(10), "fib").is_same_object(w(89))
 
-@slow_test
+@very_slow_test
 def test_become():
     sourcecode = """
     testBecome
@@ -55,7 +57,6 @@
     w_result = perform(w(10), "testBecome")
     assert space.unwrap_int(w_result) == 42
 
-@slow_test
 def test_cached_methoddict():
     sourcecode = """fib
                         ^self < 2
diff --git a/spyvm/test/test_primitives.py b/spyvm/test/test_primitives.py
--- a/spyvm/test/test_primitives.py
+++ b/spyvm/test/test_primitives.py
@@ -5,7 +5,7 @@
 from rpython.rlib.rfloat import isinf, isnan
 from rpython.rlib.rarithmetic import intmask
 from rpython.rtyper.lltypesystem import lltype, rffi
-from .util import create_space, copy_to_module, cleanup_module, 
TestInterpreter, slow_test, very_slow_test
+from .util import create_space, copy_to_module, cleanup_module, 
TestInterpreter, very_slow_test
 
 def setup_module():
     space = create_space(bootstrap = True)
diff --git a/spyvm/test/test_strategies.py b/spyvm/test/test_strategies.py
--- a/spyvm/test/test_strategies.py
+++ b/spyvm/test/test_strategies.py
@@ -1,9 +1,9 @@
 
 from spyvm import model, storage
-from .util import read_image, copy_to_module, cleanup_module
+from .util import create_space_interp, copy_to_module, cleanup_module
 
 def setup_module():
-    space, interp, _, _ = read_image('bootstrapped.image')
+    space, interp = create_space_interp()
     class_Array = space.classtable["w_Array"]
     w_nil = space.w_nil
     copy_to_module(locals(), __name__)
diff --git a/spyvm/test/util.py b/spyvm/test/util.py
--- a/spyvm/test/util.py
+++ b/spyvm/test/util.py
@@ -6,11 +6,11 @@
 # The according options is configured in conftest.py.
 # To mark all tests in a module as slow, add this line to the module:
 # pytestmark = slow_test
-slow_test = py.test.mark.skipif('not config.getvalue("execute-slow-tests") or 
config.getvalue("execute-all-tests")',
-                        reason="Slow tests are being skipped. Add --slow|-S to 
execute slow tests.")
+slow_test = py.test.mark.skipif('not config.getvalue("execute-quick-tests")',
+                        reason="Slow tests are being skipped because of 
-Q|--quick option.")
 
-very_slow_test = py.test.mark.skipif('not 
config.getvalue("execute-all-tests")',
-                        reason="Very slow tests are being skipped. Add 
--all|-A to execute all tests.")
+very_slow_test = py.test.mark.skipif('not 
config.getvalue("execute-slow-tests")',
+                        reason="Very slow tests are being skipped. Add 
--slow|-S to execute all tests.")
 
 # Most tests don't need a bootstrapped objspace. Those that do, indicate so 
explicitely.
 # This way, as many tests as possible use the real, not-bootstrapped ObjSpace.
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to