1 new changeset in pytest:

http://bitbucket.org/hpk42/pytest/changeset/1d023821c041/
changeset:   1d023821c041
user:        hpk42
date:        2011-07-14 19:17:17
summary:     add some debugging tracing to assertion rewriting to understand 
where failures (specifically issue60) come from.
affected #:  3 files (419 bytes)

--- a/_pytest/__init__.py       Thu Jul 14 19:11:50 2011 +0200
+++ b/_pytest/__init__.py       Thu Jul 14 19:17:17 2011 +0200
@@ -1,2 +1,2 @@
 #
-__version__ = '2.1.1.dev3'
+__version__ = '2.1.1.dev4'


--- a/_pytest/assertion/rewrite.py      Thu Jul 14 19:11:50 2011 +0200
+++ b/_pytest/assertion/rewrite.py      Thu Jul 14 19:17:17 2011 +0200
@@ -44,6 +44,7 @@
             return None
         sess = self.session
         state = sess.config._assertstate
+        state.trace("find_module called for: %s" % name)
         names = name.rsplit(".", 1)
         lastname = names[-1]
         pth = None
@@ -76,11 +77,14 @@
             try:
                 for pat in self.fnpats:
                     if fn_pypath.fnmatch(pat):
+                        state.trace("matched test file %r" % (fn,))
                         break
                 else:
                     return None
             finally:
                 self.session = sess
+        else:
+            state.trace("matched test file (was specified on cmdline): %r" % 
(fn,))
         # The requested module looks like a test file, so rewrite it. This is
         # the most magical part of the process: load the source, rewrite the
         # asserts, and load the rewritten source. We also cache the rewritten
@@ -97,6 +101,11 @@
             except py.error.EACCES:
                 state.trace("read only directory: %r" % (fn_pypath.dirname,))
                 write = False
+            except py.error.EEXIST:
+                state.trace("failure to create directory: %r" % (
+                    fn_pypath.dirname,))
+                raise
+                #write = False
         cache_name = fn_pypath.basename[:-3] + "." + PYTEST_TAG + ".pyc"
         pyc = os.path.join(cache_dir, cache_name)
         # Notice that even if we're in a read-only directory, I'm going to 
check


--- a/setup.py  Thu Jul 14 19:11:50 2011 +0200
+++ b/setup.py  Thu Jul 14 19:17:17 2011 +0200
@@ -24,7 +24,7 @@
         name='pytest',
         description='py.test: simple powerful testing with Python',
         long_description = long_description,
-        version='2.1.1.dev3',
+        version='2.1.1.dev4',
         url='http://pytest.org',
         license='MIT license',
         platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],

Repository URL: https://bitbucket.org/hpk42/pytest/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
py-svn mailing list
py-svn@codespeak.net
http://codespeak.net/mailman/listinfo/py-svn

Reply via email to