[py-svn] r14653 - in py/dist/py: compat documentation test tool
dstanek at codespeak.net
dstanek at codespeak.net
Thu Jul 14 00:27:22 CEST 2005
Author: dstanek
Date: Thu Jul 14 00:27:19 2005
New Revision: 14653
Modified:
py/dist/py/compat/optparse.py
py/dist/py/documentation/conftest.py
py/dist/py/test/config.py
py/dist/py/tool/utestconvert.py
Log:
The imports of CPython modules that are in py.compat have all been
updated to use the py.compat modules. This is part of Issue 8.
Modified: py/dist/py/compat/optparse.py
==============================================================================
--- py/dist/py/compat/optparse.py (original)
+++ py/dist/py/compat/optparse.py Thu Jul 14 00:27:19 2005
@@ -68,9 +68,12 @@
import sys, os
import types
-import textwrap
from gettext import gettext as _
+import py
+textwrap = py.compat.textwrap
+
+
def _repr(self):
return "<%s at 0x%x: %s>" % (self.__class__.__name__, id(self), self)
Modified: py/dist/py/documentation/conftest.py
==============================================================================
--- py/dist/py/documentation/conftest.py (original)
+++ py/dist/py/documentation/conftest.py Thu Jul 14 00:27:19 2005
@@ -56,7 +56,7 @@
def execute(self, mod, docstring):
mod.__doc__ = docstring
- failed, tot = py.std.doctest.testmod(mod, verbose=1)
+ failed, tot = py.compat.doctest.testmod(mod, verbose=1)
if failed:
py.test.fail("doctest %s: %s failed out of %s" %(
self.fspath, failed, tot))
Modified: py/dist/py/test/config.py
==============================================================================
--- py/dist/py/test/config.py (original)
+++ py/dist/py/test/config.py Thu Jul 14 00:27:19 2005
@@ -1,7 +1,7 @@
from __future__ import generators
import py
-from py.__.test.tool import optparse
+optparse = py.compat.optparse
defaultconfig = py.magic.autopath().dirpath('defaultconftest.py')
dummy = object()
Modified: py/dist/py/tool/utestconvert.py
==============================================================================
--- py/dist/py/tool/utestconvert.py (original)
+++ py/dist/py/tool/utestconvert.py Thu Jul 14 00:27:19 2005
@@ -185,11 +185,11 @@
if __name__ == '__main__':
- from optparse import OptionParser
import sys
+ import py
usage = "usage: %prog [-s [filename ...] | [-i | -c filename ...]]"
- optparser = OptionParser(usage)
+ optparser = py.compat.optparse.OptionParser(usage)
def select_output (option, opt, value, optparser, **kw):
if hasattr(optparser, 'output'):
More information about the pytest-commit
mailing list