[pypy-svn] r38225 - in pypy/dist/pypy: . lang/js/test tool/pytest tool/test translator/asm/ppcgen

hpk at codespeak.net hpk at codespeak.net
Fri Feb 9 01:11:52 CET 2007


Author: hpk
Date: Fri Feb  9 01:11:47 2007
New Revision: 38225

Modified:
   pypy/dist/pypy/conftest.py
   pypy/dist/pypy/lang/js/test/test_interp.py
   pypy/dist/pypy/tool/pytest/appsupport.py
   pypy/dist/pypy/tool/test/test_conftest1.py
   pypy/dist/pypy/translator/asm/ppcgen/asmfunc.py
   pypy/dist/pypy/translator/asm/ppcgen/symbol_lookup.py
Log:
adapting to changes coming from the py-trunk/dist merge


Modified: pypy/dist/pypy/conftest.py
==============================================================================
--- pypy/dist/pypy/conftest.py	(original)
+++ pypy/dist/pypy/conftest.py	Fri Feb  9 01:11:47 2007
@@ -7,6 +7,9 @@
 
 rootdir = py.magic.autopath().dirpath()
 
+dist_rsync_roots = ['.', '../lib-python', '../py', '../demo']
+dist_rsync_ignore = ['_cache']
+
 #
 # PyPy's command line extra options (these are added 
 # to py.test's standard options) 
@@ -221,10 +224,10 @@
 _pygame_imported = False
 
 class IntTestFunction(PyPyTestFunction):
-    def haskeyword(self, keyword):
+    def _haskeyword(self, keyword):
         if keyword == 'interplevel':
             return True 
-        return super(IntTestFunction, self).haskeyword(keyword)
+        return super(IntTestFunction, self)._haskeyword(keyword)
 
     def execute(self, target, *args):
         co = target.func_code
@@ -254,8 +257,8 @@
                                      "if conftest.option.view is False")
 
 class AppTestFunction(PyPyTestFunction): 
-    def haskeyword(self, keyword):
-        return keyword == 'applevel' or super(AppTestFunction, self).haskeyword(keyword)
+    def _haskeyword(self, keyword):
+        return keyword == 'applevel' or super(AppTestFunction, self)._haskeyword(keyword)
 
     def execute(self, target, *args):
         assert not args 
@@ -302,9 +305,9 @@
 class IntClassCollector(PyPyClassCollector): 
     Function = IntTestFunction 
 
-    def haskeyword(self, keyword):
+    def _haskeyword(self, keyword):
         return keyword == 'interplevel' or \
-               super(IntClassCollector, self).haskeyword(keyword)
+               super(IntClassCollector, self)._haskeyword(keyword)
 
 class AppClassInstance(py.test.collect.Instance): 
     Function = AppTestMethod 
@@ -322,12 +325,12 @@
 class AppClassCollector(PyPyClassCollector): 
     Instance = AppClassInstance 
 
-    def haskeyword(self, keyword):
+    def _haskeyword(self, keyword):
         return keyword == 'applevel' or \
-               super(AppClassCollector, self).haskeyword(keyword)
+               super(AppClassCollector, self)._haskeyword(keyword)
 
     def setup(self): 
-        super(AppClassCollector, self).setup()         
+        super(AppClassCollector, self).setup()        
         cls = self.obj 
         space = cls.space 
         clsname = cls.__name__ 

Modified: pypy/dist/pypy/lang/js/test/test_interp.py
==============================================================================
--- pypy/dist/pypy/lang/js/test/test_interp.py	(original)
+++ pypy/dist/pypy/lang/js/test/test_interp.py	Fri Feb  9 01:11:47 2007
@@ -454,4 +454,3 @@
     
     def test_unary_plus(self):
         self.assert_prints("print(+1)", ['1'])
-

Modified: pypy/dist/pypy/tool/pytest/appsupport.py
==============================================================================
--- pypy/dist/pypy/tool/pytest/appsupport.py	(original)
+++ pypy/dist/pypy/tool/pytest/appsupport.py	Fri Feb  9 01:11:47 2007
@@ -4,6 +4,7 @@
 from py.__.magic import exprinfo
 from pypy.interpreter import gateway
 from pypy.interpreter.error import OperationError
+from py.__.test.outcome import ExceptionFailure
 
 # ____________________________________________________________
 
@@ -212,7 +213,7 @@
         if not value.match(space, w_ExpectedException):
             raise type, value, tb
         return excinfo
-    except py.test.Item.ExceptionFailure, e:
+    except ExceptionFailure, e:
         e.tbindex = getattr(e, 'tbindex', -1) - 1
         raise
 

Modified: pypy/dist/pypy/tool/test/test_conftest1.py
==============================================================================
--- pypy/dist/pypy/tool/test/test_conftest1.py	(original)
+++ pypy/dist/pypy/tool/test/test_conftest1.py	Fri Feb  9 01:11:47 2007
@@ -3,19 +3,20 @@
 
 innertest = py.magic.autopath().dirpath('conftest1_innertest.py')
 from py.__.test.terminal.terminal import TerminalSession
+from py.__.test.outcome import Passed, Failed, Skipped
 
 class TestPyPyTests: 
     def test_select_interplevel(self): 
         config = py.test.config._reparse([innertest, '-k', 'interplevel'])
         session = TerminalSession(config, py.std.sys.stdout)
         session.main()
-        l = session.getitemoutcomepairs(py.test.Item.Passed)
+        l = session.getitemoutcomepairs(Passed)
         assert len(l) == 2 
         for item in l:
             assert item[0].name in ('test_something', 'test_method')
         #item = l[0][0]
         #assert item.name == 'test_one'
-        l = session.getitemoutcomepairs(py.test.Item.Skipped)
+        l = session.getitemoutcomepairs(Skipped)
         assert len(l) == 2 
         for item in l:
             assert item[0].name in ('app_test_something', 'test_method_app')
@@ -24,13 +25,13 @@
         config = py.test.config._reparse([innertest, '-k', 'applevel'])
         session = TerminalSession(config, py.std.sys.stdout)
         session.main()
-        l = session.getitemoutcomepairs(py.test.Item.Passed)
+        l = session.getitemoutcomepairs(Passed)
         assert len(l) == 2 
         for item in l:
             assert item[0].name in ('app_test_something', 'test_method_app')
         #item = l[0][0]
         #assert item.name == 'test_one'
-        l = session.getitemoutcomepairs(py.test.Item.Skipped)
+        l = session.getitemoutcomepairs(Skipped)
         assert len(l) == 2 
         for item in l:
             assert item[0].name in ('test_something', 'test_method')
@@ -40,13 +41,13 @@
                                           '-k', 'applevel', '--appdirect'])
         session = TerminalSession(config, py.std.sys.stdout)
         session.main()
-        l = session.getitemoutcomepairs(py.test.Item.Passed)
+        l = session.getitemoutcomepairs(Passed)
         assert len(l) == 2 
         for item in l:
             assert item[0].name in ('app_test_something', 'test_method_app')
         #item = l[0][0]
         #assert item.name == 'test_one'
-        l = session.getitemoutcomepairs(py.test.Item.Skipped)
+        l = session.getitemoutcomepairs(Skipped)
         assert len(l) == 2 
         for item in l:
             assert item[0].name in ('test_something', 'test_method')

Modified: pypy/dist/pypy/translator/asm/ppcgen/asmfunc.py
==============================================================================
--- pypy/dist/pypy/translator/asm/ppcgen/asmfunc.py	(original)
+++ pypy/dist/pypy/translator/asm/ppcgen/asmfunc.py	Fri Feb  9 01:11:47 2007
@@ -6,7 +6,7 @@
 def get_ppcgen():
     global _ppcgen
     if _ppcgen is None:
-        _ppcgen = py.magic.autopath().dirpath().join('_ppcgen.c').getpymodule()
+        _ppcgen = py.magic.autopath().dirpath().join('_ppcgen.c')._getpymodule()
     return _ppcgen
 
 class AsmCode(object):

Modified: pypy/dist/pypy/translator/asm/ppcgen/symbol_lookup.py
==============================================================================
--- pypy/dist/pypy/translator/asm/ppcgen/symbol_lookup.py	(original)
+++ pypy/dist/pypy/translator/asm/ppcgen/symbol_lookup.py	Fri Feb  9 01:11:47 2007
@@ -3,7 +3,7 @@
     global lookup
     import py
 
-    _ppcgen = py.magic.autopath().dirpath().join('_ppcgen.c').getpymodule()
+    _ppcgen = py.magic.autopath().dirpath().join('_ppcgen.c')._getpymodule()
 
     try:
         from _ppcgen import NSLookupAndBindSymbol



More information about the Pypy-commit mailing list