fixing some release/apigen related issues

--HG--
branch : trunk
This commit is contained in:
holger krekel 2009-06-18 20:04:36 +02:00
parent 82d40724fa
commit 629fe2151c
4 changed files with 14 additions and 3 deletions

View File

@ -66,7 +66,6 @@ initpkg(__name__,
'test.__doc__' : ('./test/__init__.py', '__doc__'),
'test._PluginManager' : ('./test/pluginmanager.py', 'PluginManager'),
'test.raises' : ('./test/outcome.py', 'raises'),
'test.deprecated_call' : ('./test/outcome.py', 'deprecated_call'),
'test.skip' : ('./test/outcome.py', 'skip'),
'test.importorskip' : ('./test/outcome.py', 'importorskip'),
'test.fail' : ('./test/outcome.py', 'fail'),

View File

@ -109,7 +109,7 @@ class Hooks:
mm = HookCall(registry, name, firstresult=firstresult)
setattr(self, name, mm)
def __repr__(self):
return "<Hooks %r %r>" %(self._hookspecs, self._plugins)
return "<Hooks %r %r>" %(self._hookspecs, self.registry)
class HookCall:
def __init__(self, registry, name, firstresult, extralookup=None):

View File

@ -10,6 +10,7 @@ except ImportError:
py.std.sys.exit()
else:
args = list(sys.argv[1:])
args.extend(['-p', 'apigen'])
argkeys = [a.split('=')[0] for a in args]
if '--apigen' not in argkeys:
args.append('--apigen')
@ -18,5 +19,5 @@ else:
os.path.dirname(apigen.__file__), 'tool', 'py_build', 'build.py')
args.append('--apigenscript=%s' % (fpath,))
if '--apigenpath' not in argkeys:
args.append('--apigenpath=/tmp/pylib-api')
args.append('--apigenpath=api')
py.test.cmdline.main(args)

View File

@ -4,6 +4,17 @@ import py
import sys
import inspect
def test_all_resolves():
seen = py.builtin.set([py])
lastlength = None
while len(seen) != lastlength:
lastlength = len(seen)
for item in py.builtin.frozenset(seen):
for value in item.__dict__.values():
if isinstance(value, type(py.test)):
seen.add(value)
class TestAPI_V0_namespace_consistence:
def test_path_entrypoints(self):
assert inspect.ismodule(py.path)