From e593841a70c64cb3ef970dcd0aed0836e1fb40a2 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Mon, 17 May 2010 17:32:34 +0200 Subject: [PATCH] fix looponfailing issue to always run against the newest version of the source --- CHANGELOG | 6 ++++++ testing/test_remote.py | 3 --- xdist/remote.py | 3 +-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 51a49be..64795dd 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,9 @@ +1.3 +------------------------- + +- fix --looponfailing - it would not actually run against the fully changed + source tree when initial conftest files load application state. + 1.2 ------------------------- diff --git a/testing/test_remote.py b/testing/test_remote.py index 30a20c4..94d8391 100644 --- a/testing/test_remote.py +++ b/testing/test_remote.py @@ -61,7 +61,6 @@ class TestLooponFailing: """) session = LooponfailingSession(modcol.config) loopstate = LoopState() - session.remotecontrol.setup() session.loop_once(loopstate) assert len(loopstate.colitems) == 1 @@ -83,7 +82,6 @@ class TestLooponFailing: """) session = LooponfailingSession(modcol.config) loopstate = LoopState() - session.remotecontrol.setup() loopstate.colitems = [] session.loop_once(loopstate) assert len(loopstate.colitems) == 1 @@ -110,7 +108,6 @@ class TestLooponFailing: """) session = LooponfailingSession(modcol.config) loopstate = LoopState() - session.remotecontrol.setup() loopstate.colitems = [] session.loop_once(loopstate) assert len(loopstate.colitems) == 2 diff --git a/xdist/remote.py b/xdist/remote.py index 7b54f06..2df00c8 100644 --- a/xdist/remote.py +++ b/xdist/remote.py @@ -24,7 +24,6 @@ class LooponfailingSession(Session): def main(self, initialitems): try: self.loopstate = loopstate = LoopState([]) - self.remotecontrol.setup() while 1: self.loop_once(loopstate) if not loopstate.colitems and loopstate.wasfailing: @@ -34,10 +33,10 @@ class LooponfailingSession(Session): print def loop_once(self, loopstate): + self.remotecontrol.setup() colitems = loopstate.colitems loopstate.wasfailing = colitems and len(colitems) loopstate.colitems = self.remotecontrol.runsession(colitems or ()) - self.remotecontrol.setup() class LoopState: def __init__(self, colitems=None):