[py-svn] py-trunk commit de6c5417d3b3: remove/refine some doc strings. create popen-files with absolute paths.

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Fri Jan 1 23:10:35 CET 2010


# HG changeset patch -- Bitbucket.org
# Project py-trunk
# URL http://bitbucket.org/hpk42/py-trunk/overview/
# User holger krekel <holger at merlinux.eu>
# Date 1262383500 -3600
# Node ID de6c5417d3b3b5e36fd03c77181e073352b50641
# Parent ac6e3880bb7be0068cd91862c39386d943acbff8
remove/refine some doc strings.  create popen-files with absolute paths.

--- a/py/impl/test/pycollect.py
+++ b/py/impl/test/pycollect.py
@@ -1,20 +1,5 @@
 """
-Python related collection nodes.  Here is an example of 
-a tree of collectors and test items that this modules provides:: 
-
-        Module                  # File
-            Class 
-                Instance   
-                    Function  
-                    Generator 
-                        ... 
-            Function 
-            Generator 
-                Function 
-
-        DoctestFile              # File
-            DoctestFileContent   # acts as Item 
-
+Python related collection nodes.  
 """ 
 import py
 import inspect

--- a/py/impl/test/collect.py
+++ b/py/impl/test/collect.py
@@ -1,6 +1,5 @@
 """
-base test collection objects.  
-Collectors and test Items form a tree
+base test collection objects.  Collectors and test Items form a tree
 that is usually built iteratively.  
 """ 
 import py
@@ -24,17 +23,8 @@ class HookProxy:
         return call_matching_hooks
 
 class Node(object): 
-    """ base class for Nodes in the collection tree.  
-        Collector nodes have children and 
-        Item nodes are terminal. 
-
-        All nodes of the collection tree carry a _config 
-        attribute for these reasons: 
-        - to access custom Collection Nodes from a project 
-          (defined in conftest's)
-        - to pickle themselves relatively to the "topdir" 
-        - configuration/options for setup/teardown 
-          stdout/stderr capturing and execution of test items 
+    """ base class for all Nodes in the collection tree.  
+        Collector subclasses have children, Items are terminal nodes. 
     """
     def __init__(self, name, parent=None, config=None):
         self.name = name 
@@ -262,12 +252,10 @@ class Node(object):
         return col._getitembynames(names)
     _fromtrail = staticmethod(_fromtrail)
 
-    def _repr_failure_py(self, excinfo, outerr=None):
-        assert outerr is None, "XXX deprecated"
+    def _repr_failure_py(self, excinfo):
         excinfo.traceback = self._prunetraceback(excinfo.traceback)
-        # XXX temporary hack: getrepr() should not take a 'style' argument
-        # at all; it should record all data in all cases, and the style
-        # should be parametrized in toterminal().
+        # XXX should excinfo.getrepr record all data and toterminal()
+        # process it? 
         if self.config.option.tbstyle == "short":
             style = "short"
         else:

--- a/py/plugin/pytest_pytester.py
+++ b/py/plugin/pytest_pytester.py
@@ -284,8 +284,8 @@ class TmpTestdir:
 
     def _run(self, *cmdargs):
         cmdargs = [str(x) for x in cmdargs]
-        p1 = py.path.local("stdout")
-        p2 = py.path.local("stderr")
+        p1 = self.tmpdir.join("stdout")
+        p2 = self.tmpdir.join("stderr")
         print_("running", cmdargs, "curdir=", py.path.local())
         f1 = p1.open("w")
         f2 = p2.open("w")



More information about the pytest-commit mailing list