From 9be7d78fb1320853caed87c364964df99b01c738 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Tue, 29 Dec 2009 21:18:17 +0100 Subject: [PATCH] some debug info aimed at helping to find out about a randomly failing test_export test setup issue --HG-- branch : trunk --- testing/path/conftest.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/testing/path/conftest.py b/testing/path/conftest.py index 283be578b..a51542ff2 100644 --- a/testing/path/conftest.py +++ b/testing/path/conftest.py @@ -1,4 +1,5 @@ import py +import sys from py.impl.path import svnwc as svncommon svnbin = py.path.local.sysfind('svn') @@ -9,14 +10,14 @@ def pytest_funcarg__repowc1(request): if svnbin is None: py.test.skip("svn binary not found") - modname = request.module.__name__ tmpdir = request.getfuncargvalue("tmpdir") repo, repourl, wc = request.cached_setup( - setup=lambda: getrepowc(tmpdir, "repo-"+modname, "wc-" + modname), + setup=lambda: getrepowc(tmpdir, "path1repo", "path1wc"), scope="module", ) for x in ('test_remove', 'test_move', 'test_status_deleted'): if request.function.__name__.startswith(x): + print >>sys.stderr, ("saving repo", repo, "for", request.function) _savedrepowc = save_repowc(repo, wc) request.addfinalizer(lambda: restore_repowc(_savedrepowc)) return repo, repourl, wc @@ -66,6 +67,7 @@ def save_repowc(repo, wc): def restore_repowc(obj): savedrepo, savedwc = obj + print >>sys.stderr, ("restoring", savedrepo) repo = savedrepo.new(basename=savedrepo.basename[:-2]) assert repo.check() wc = savedwc.new(basename=savedwc.basename[:-2])