Rev 177: Added processing option on QueueSetup, to define whether any further queue requests are being processed. in http://bzr.daniel-watkins.co.uk/pqm/empty-queue

Daniel Watkins daniel at daniel-watkins.co.uk
Thu Jul 10 16:59:35 BST 2008


At http://bzr.daniel-watkins.co.uk/pqm/empty-queue

------------------------------------------------------------
revno: 177
revision-id: daniel at daniel-watkins.co.uk-20080710155822-i9toa3rw19sp0pt2
parent: robertc at robertcollins.net-20080710074340-dl0w25nbutl88sz2
committer: Daniel Watkins <daniel at daniel-watkins.co.uk>
branch nick: empty-queue
timestamp: Thu 2008-07-10 16:58:22 +0100
message:
  Added processing option on QueueSetup, to define whether any further queue requests are being processed.
-------------- next part --------------
=== modified file 'pqm/tests/test_pqm.py'
--- a/pqm/tests/test_pqm.py	2008-07-10 07:43:40 +0000
+++ b/pqm/tests/test_pqm.py	2008-07-10 15:58:22 +0000
@@ -121,12 +121,13 @@
 class QueueSetup(object):
     """Setup a queue with mock messages in it."""
 
-    def __init__(self):
+    def __init__(self, processing=True):
         self.configFileName = "Foo"
         self.cwd = os.path.abspath(os.path.curdir)
         self.message = sample_message
         self.message_bad = sample_message_bad
         self.message3 = sample_message_2
+        self.processing = processing
 
     def setUp(self):
         myFile=open(self.configFileName, "w")
@@ -144,6 +145,8 @@
             os.mkdir(self.queuedir + '/pqm')
         except OSError:
             pass
+        if not self.processing:
+            open("%s/stop.patch" % (self.queuedir,), "w").close()
         self.messageFileName = os.path.join(self.queuedir, "patch.00000001")
         messageFile = open(self.messageFileName, "w")
         messageFile.write(self.message)



More information about the bazaar-commits mailing list