aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolger Krekel <holger.krekel@gmail.com>2010-05-06 17:06:57 +0000
committerHolger Krekel <holger.krekel@gmail.com>2010-05-06 17:06:57 +0000
commit3c833941b012f327640b0e3d6bdd3de9ebd1f1ef (patch)
tree5cb12f75dae6ffd97c2f286031af72e3f31edc8b /py/__init__.py
parentThis has been fixed with r74102 (diff)
downloadpypy-3c833941b012f327640b0e3d6bdd3de9ebd1f1ef.tar.gz
pypy-3c833941b012f327640b0e3d6bdd3de9ebd1f1ef.tar.bz2
pypy-3c833941b012f327640b0e3d6bdd3de9ebd1f1ef.zip
merge py12 branch - incorporates and updates pypy tests to use py.test-1.3.0
* introduces spaceconfig attribute to specify which space to use for a certain test class. * removes deprecated usage of py.test features * removes internal imports of py lib * various little test functionality related cleanups note: the merging was going odd with svn throwing assertion errors and other issues - so i merged in two steps - hope this worked fine.
Diffstat (limited to 'py/__init__.py')
-rw-r--r--py/__init__.py235
1 files changed, 113 insertions, 122 deletions
diff --git a/py/__init__.py b/py/__init__.py
index 8ab407234a..36cc5b00d8 100644
--- a/py/__init__.py
+++ b/py/__init__.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
"""
py.test and pylib: rapid testing and development utils
@@ -7,181 +6,173 @@ and classes. The initpkg-dictionary below specifies
name->value mappings where value can be another namespace
dictionary or an import path.
-(c) Holger Krekel and others, 2009
+(c) Holger Krekel and others, 2004-2010
"""
-version = "1.1.1"
+__version__ = version = "1.3.0"
-__version__ = version = version or "1.1.x"
import py.apipkg
py.apipkg.initpkg(__name__, dict(
# access to all standard lib modules
- std = '.impl.std:std',
+ std = '._std:std',
# access to all posix errno's as classes
- error = '.impl.error:error',
+ error = '._error:error',
- _impldir = '.impl._metainfo:impldir',
- _dir = '.impl._metainfo:pydir',
- _pydirs = '.impl._metainfo:pydirs',
+ _pydir = '.__metainfo:pydir',
version = 'py:__version__', # backward compatibility
- _com = {
- 'Registry': '.impl._com:Registry',
- 'MultiCall': '.impl._com:MultiCall',
- 'comregistry': '.impl._com:comregistry',
- 'HookRelay': '.impl._com:HookRelay',
- },
cmdline = {
- 'pytest': '.impl.cmdline.pytest:main',
- 'pylookup': '.impl.cmdline.pylookup:main',
- 'pycountloc': '.impl.cmdline.pycountlog:main',
- 'pytest': '.impl.test.cmdline:main',
- 'pylookup': '.impl.cmdline.pylookup:main',
- 'pycountloc': '.impl.cmdline.pycountloc:main',
- 'pycleanup': '.impl.cmdline.pycleanup:main',
- 'pywhich' : '.impl.cmdline.pywhich:main',
- 'pysvnwcrevert' : '.impl.cmdline.pysvnwcrevert:main',
- 'pyconvert_unittest' : '.impl.cmdline.pyconvert_unittest:main',
+ 'pytest': '._cmdline.pytest:main',
+ 'pylookup': '._cmdline.pylookup:main',
+ 'pycountloc': '._cmdline.pycountlog:main',
+ 'pytest': '._test.cmdline:main',
+ 'pylookup': '._cmdline.pylookup:main',
+ 'pycountloc': '._cmdline.pycountloc:main',
+ 'pycleanup': '._cmdline.pycleanup:main',
+ 'pywhich' : '._cmdline.pywhich:main',
+ 'pysvnwcrevert' : '._cmdline.pysvnwcrevert:main',
+ 'pyconvert_unittest' : '._cmdline.pyconvert_unittest:main',
},
test = {
# helpers for use from test functions or collectors
- '__doc__' : '.impl.test:__doc__',
- '_PluginManager' : '.impl.test.pluginmanager:PluginManager',
- 'raises' : '.impl.test.outcome:raises',
- 'skip' : '.impl.test.outcome:skip',
- 'importorskip' : '.impl.test.outcome:importorskip',
- 'fail' : '.impl.test.outcome:fail',
- 'exit' : '.impl.test.outcome:exit',
+ '__onfirstaccess__' : '._test.config:onpytestaccess',
+ '__doc__' : '._test:__doc__',
# configuration/initialization related test api
- 'config' : '.impl.test.config:config_per_process',
- 'ensuretemp' : '.impl.test.config:ensuretemp',
+ 'config' : '._test.config:config_per_process',
+ 'ensuretemp' : '._test.config:ensuretemp',
'collect': {
- 'Collector' : '.impl.test.collect:Collector',
- 'Directory' : '.impl.test.collect:Directory',
- 'File' : '.impl.test.collect:File',
- 'Item' : '.impl.test.collect:Item',
- 'Module' : '.impl.test.pycollect:Module',
- 'Class' : '.impl.test.pycollect:Class',
- 'Instance' : '.impl.test.pycollect:Instance',
- 'Generator' : '.impl.test.pycollect:Generator',
- 'Function' : '.impl.test.pycollect:Function',
- '_fillfuncargs' : '.impl.test.funcargs:fillfuncargs',
+ 'Collector' : '._test.collect:Collector',
+ 'Directory' : '._test.collect:Directory',
+ 'File' : '._test.collect:File',
+ 'Item' : '._test.collect:Item',
+ 'Module' : '._test.pycollect:Module',
+ 'Class' : '._test.pycollect:Class',
+ 'Instance' : '._test.pycollect:Instance',
+ 'Generator' : '._test.pycollect:Generator',
+ 'Function' : '._test.pycollect:Function',
+ '_fillfuncargs' : '._test.funcargs:fillfuncargs',
},
'cmdline': {
- 'main' : '.impl.test.cmdline:main', # backward compat
+ 'main' : '._test.cmdline:main', # backward compat
},
},
# hook into the top-level standard library
process = {
- '__doc__' : '.impl.process:__doc__',
- 'cmdexec' : '.impl.process.cmdexec:cmdexec',
- 'kill' : '.impl.process.killproc:kill',
- 'ForkedFunc' : '.impl.process.forkedfunc:ForkedFunc',
+ '__doc__' : '._process:__doc__',
+ 'cmdexec' : '._process.cmdexec:cmdexec',
+ 'kill' : '._process.killproc:kill',
+ 'ForkedFunc' : '._process.forkedfunc:ForkedFunc',
},
path = {
- '__doc__' : '.impl.path:__doc__',
- 'svnwc' : '.impl.path.svnwc:SvnWCCommandPath',
- 'svnurl' : '.impl.path.svnurl:SvnCommandPath',
- 'local' : '.impl.path.local:LocalPath',
- 'SvnAuth' : '.impl.path.svnwc:SvnAuth',
+ '__doc__' : '._path:__doc__',
+ 'svnwc' : '._path.svnwc:SvnWCCommandPath',
+ 'svnurl' : '._path.svnurl:SvnCommandPath',
+ 'local' : '._path.local:LocalPath',
+ 'SvnAuth' : '._path.svnwc:SvnAuth',
},
# some nice slightly magic APIs
magic = {
- 'invoke' : '.impl.code.oldmagic:invoke',
- 'revoke' : '.impl.code.oldmagic:revoke',
- 'patch' : '.impl.code.oldmagic:patch',
- 'revert' : '.impl.code.oldmagic:revert',
- 'autopath' : '.impl.path.local:autopath',
- 'AssertionError' : '.impl.code.oldmagic2:AssertionError',
+ 'invoke' : '._code.oldmagic:invoke',
+ 'revoke' : '._code.oldmagic:revoke',
+ 'patch' : '._code.oldmagic:patch',
+ 'revert' : '._code.oldmagic:revert',
+ 'autopath' : '._path.local:autopath',
+ 'AssertionError' : '._code.oldmagic2:AssertionError',
},
# python inspection/code-generation API
code = {
- '__doc__' : '.impl.code:__doc__',
- 'compile' : '.impl.code.source:compile_',
- 'Source' : '.impl.code.source:Source',
- 'Code' : '.impl.code.code:Code',
- 'Frame' : '.impl.code.code:Frame',
- 'ExceptionInfo' : '.impl.code.code:ExceptionInfo',
- 'Traceback' : '.impl.code.code:Traceback',
- 'getfslineno' : '.impl.code.source:getfslineno',
- 'getrawcode' : '.impl.code.code:getrawcode',
- 'patch_builtins' : '.impl.code.code:patch_builtins',
- 'unpatch_builtins' : '.impl.code.code:unpatch_builtins',
- '_AssertionError' : '.impl.code.assertion:AssertionError',
+ '__doc__' : '._code:__doc__',
+ 'compile' : '._code.source:compile_',
+ 'Source' : '._code.source:Source',
+ 'Code' : '._code.code:Code',
+ 'Frame' : '._code.code:Frame',
+ 'ExceptionInfo' : '._code.code:ExceptionInfo',
+ 'Traceback' : '._code.code:Traceback',
+ 'getfslineno' : '._code.source:getfslineno',
+ 'getrawcode' : '._code.code:getrawcode',
+ 'patch_builtins' : '._code.code:patch_builtins',
+ 'unpatch_builtins' : '._code.code:unpatch_builtins',
+ '_AssertionError' : '._code.assertion:AssertionError',
+ '_reinterpret_old' : '._code.assertion:reinterpret_old',
+ '_reinterpret' : '._code.assertion:reinterpret',
},
# backports and additions of builtins
builtin = {
- '__doc__' : '.impl.builtin:__doc__',
- 'enumerate' : '.impl.builtin:enumerate',
- 'reversed' : '.impl.builtin:reversed',
- 'sorted' : '.impl.builtin:sorted',
- 'set' : '.impl.builtin:set',
- 'frozenset' : '.impl.builtin:frozenset',
- 'BaseException' : '.impl.builtin:BaseException',
- 'GeneratorExit' : '.impl.builtin:GeneratorExit',
- 'print_' : '.impl.builtin:print_',
- '_reraise' : '.impl.builtin:_reraise',
- '_tryimport' : '.impl.builtin:_tryimport',
- 'exec_' : '.impl.builtin:exec_',
- '_basestring' : '.impl.builtin:_basestring',
- '_totext' : '.impl.builtin:_totext',
- '_isbytes' : '.impl.builtin:_isbytes',
- '_istext' : '.impl.builtin:_istext',
- '_getimself' : '.impl.builtin:_getimself',
- '_getfuncdict' : '.impl.builtin:_getfuncdict',
- 'builtins' : '.impl.builtin:builtins',
- 'execfile' : '.impl.builtin:execfile',
- 'callable' : '.impl.builtin:callable',
+ '__doc__' : '._builtin:__doc__',
+ 'enumerate' : '._builtin:enumerate',
+ 'reversed' : '._builtin:reversed',
+ 'sorted' : '._builtin:sorted',
+ 'set' : '._builtin:set',
+ 'frozenset' : '._builtin:frozenset',
+ 'BaseException' : '._builtin:BaseException',
+ 'GeneratorExit' : '._builtin:GeneratorExit',
+ 'print_' : '._builtin:print_',
+ '_reraise' : '._builtin:_reraise',
+ '_tryimport' : '._builtin:_tryimport',
+ 'exec_' : '._builtin:exec_',
+ '_basestring' : '._builtin:_basestring',
+ '_totext' : '._builtin:_totext',
+ '_isbytes' : '._builtin:_isbytes',
+ '_istext' : '._builtin:_istext',
+ '_getimself' : '._builtin:_getimself',
+ '_getfuncdict' : '._builtin:_getfuncdict',
+ '_getcode' : '._builtin:_getcode',
+ 'builtins' : '._builtin:builtins',
+ 'execfile' : '._builtin:execfile',
+ 'callable' : '._builtin:callable',
},
# input-output helping
io = {
- '__doc__' : '.impl.io:__doc__',
- 'dupfile' : '.impl.io.capture:dupfile',
- 'TextIO' : '.impl.io.capture:TextIO',
- 'BytesIO' : '.impl.io.capture:BytesIO',
- 'FDCapture' : '.impl.io.capture:FDCapture',
- 'StdCapture' : '.impl.io.capture:StdCapture',
- 'StdCaptureFD' : '.impl.io.capture:StdCaptureFD',
- 'TerminalWriter' : '.impl.io.terminalwriter:TerminalWriter',
+ '__doc__' : '._io:__doc__',
+ 'dupfile' : '._io.capture:dupfile',
+ 'TextIO' : '._io.capture:TextIO',
+ 'BytesIO' : '._io.capture:BytesIO',
+ 'FDCapture' : '._io.capture:FDCapture',
+ 'StdCapture' : '._io.capture:StdCapture',
+ 'StdCaptureFD' : '._io.capture:StdCaptureFD',
+ 'TerminalWriter' : '._io.terminalwriter:TerminalWriter',
+ 'ansi_print' : '._io.terminalwriter:ansi_print',
+ 'get_terminal_width' : '._io.terminalwriter:get_terminal_width',
+ 'saferepr' : '._io.saferepr:saferepr',
},
# small and mean xml/html generation
xml = {
- '__doc__' : '.impl.xmlgen:__doc__',
- 'html' : '.impl.xmlgen:html',
- 'Tag' : '.impl.xmlgen:Tag',
- 'raw' : '.impl.xmlgen:raw',
- 'Namespace' : '.impl.xmlgen:Namespace',
- 'escape' : '.impl.xmlgen:escape',
+ '__doc__' : '._xmlgen:__doc__',
+ 'html' : '._xmlgen:html',
+ 'Tag' : '._xmlgen:Tag',
+ 'raw' : '._xmlgen:raw',
+ 'Namespace' : '._xmlgen:Namespace',
+ 'escape' : '._xmlgen:escape',
},
log = {
# logging API ('producers' and 'consumers' connected via keywords)
- '__doc__' : '.impl.log:__doc__',
- '_apiwarn' : '.impl.log.warning:_apiwarn',
- 'Producer' : '.impl.log.log:Producer',
- 'setconsumer' : '.impl.log.log:setconsumer',
- '_setstate' : '.impl.log.log:setstate',
- '_getstate' : '.impl.log.log:getstate',
- 'Path' : '.impl.log.log:Path',
- 'STDOUT' : '.impl.log.log:STDOUT',
- 'STDERR' : '.impl.log.log:STDERR',
- 'Syslog' : '.impl.log.log:Syslog',
+ '__doc__' : '._log:__doc__',
+ '_apiwarn' : '._log.warning:_apiwarn',
+ 'Producer' : '._log.log:Producer',
+ 'setconsumer' : '._log.log:setconsumer',
+ '_setstate' : '._log.log:setstate',
+ '_getstate' : '._log.log:getstate',
+ 'Path' : '._log.log:Path',
+ 'STDOUT' : '._log.log:STDOUT',
+ 'STDERR' : '._log.log:STDERR',
+ 'Syslog' : '._log.log:Syslog',
},
# compatibility modules (deprecated)
compat = {
- '__doc__' : '.impl.compat:__doc__',
- 'doctest' : '.impl.compat.dep_doctest:doctest',
- 'optparse' : '.impl.compat.dep_optparse:optparse',
- 'textwrap' : '.impl.compat.dep_textwrap:textwrap',
- 'subprocess' : '.impl.compat.dep_subprocess:subprocess',
+ '__doc__' : '._compat:__doc__',
+ 'doctest' : '._compat.dep_doctest:doctest',
+ 'optparse' : '._compat.dep_optparse:optparse',
+ 'textwrap' : '._compat.dep_textwrap:textwrap',
+ 'subprocess' : '._compat.dep_subprocess:subprocess',
},
))