------------------------------------------------------------
revno: 6599
committer: Barry Warsaw <[EMAIL PROTECTED]>
branch nick: 3.0
timestamp: Tue 2008-02-26 21:24:13 -0500
message:
Make the import of Mailman.configuration.config explicit in doctests.
modified:
Mailman/pipeline/docs/ack-headers.txt
Mailman/pipeline/docs/acknowledge.txt
Mailman/rules/docs/emergency.txt
Mailman/tests/helpers.py
Mailman/tests/test_documentation.py
=== modified file 'Mailman/pipeline/docs/ack-headers.txt'
--- a/Mailman/pipeline/docs/ack-headers.txt 2008-02-08 13:27:25 +0000
+++ b/Mailman/pipeline/docs/ack-headers.txt 2008-02-27 02:24:13 +0000
@@ -7,6 +7,7 @@
changes depend on mailing list settings and others depend on how the message
is getting sent through the system. We'll take things one-by-one.
+ >>> from Mailman.configuration import config
>>> from Mailman.pipeline.cook_headers import process
>>> mlist = config.db.list_manager.create(u'[EMAIL PROTECTED]')
>>> mlist.subject_prefix = u''
=== modified file 'Mailman/pipeline/docs/acknowledge.txt'
--- a/Mailman/pipeline/docs/acknowledge.txt 2008-02-17 22:34:21 +0000
+++ b/Mailman/pipeline/docs/acknowledge.txt 2008-02-27 02:24:13 +0000
@@ -5,6 +5,7 @@
receive acknowledgments of their postings, Mailman will sent them such an
acknowledgment.
+ >>> from Mailman.configuration import config
>>> handler = config.handlers['acknowledge']
>>> mlist = config.db.list_manager.create(u'[EMAIL PROTECTED]')
>>> mlist.real_name = u'XTest'
=== modified file 'Mailman/rules/docs/emergency.txt'
--- a/Mailman/rules/docs/emergency.txt 2008-01-26 23:35:18 +0000
+++ b/Mailman/rules/docs/emergency.txt 2008-02-27 02:24:13 +0000
@@ -27,6 +27,7 @@
sender will contain a token we can use to grab the held message out of the
pending requests.
+ >>> from Mailman.configuration import config
>>> from Mailman.queue import Switchboard
>>> virginq = Switchboard(config.VIRGINQUEUE_DIR)
=== modified file 'Mailman/tests/helpers.py'
--- a/Mailman/tests/helpers.py 2008-02-27 01:54:32 +0000
+++ b/Mailman/tests/helpers.py 2008-02-27 02:24:13 +0000
@@ -40,6 +40,9 @@
from Mailman.queue import Switchboard
+WAIT_INTERVAL = timedelta(seconds=3)
+
+
def make_testable_runner(runner_class):
"""Create a queue runner that runs until its queue is empty.
@@ -110,7 +113,7 @@
(self.exe, '-C', config.filename, '-q', 'start'))
stdout, stderr = process.communicate()
# Wait until the pid file exists.
- until = datetime.now() + timedelta(seconds=2)
+ until = datetime.now() + WAIT_INTERVAL
while datetime.now() < until:
try:
with open(config.PIDFILE) as f:
@@ -125,7 +128,7 @@
# This will usually cause the doctest to fail.
return 'Time out'
# Now wait until the process actually exists.
- until = datetime.now() + timedelta(seconds=2)
+ until = datetime.now() + WAIT_INTERVAL
while datetime.now() < until:
try:
os.kill(pid, 0)
@@ -148,7 +151,7 @@
(self.exe, '-C', config.filename, '-q', 'stop'))
stdout, stderr = process.communicate()
# Now wait until the process stops.
- until = datetime.now() + timedelta(seconds=2)
+ until = datetime.now() + WAIT_INTERVAL
while datetime.now() < until:
try:
os.kill(self.pid, 0)
=== modified file 'Mailman/tests/test_documentation.py'
--- a/Mailman/tests/test_documentation.py 2008-02-08 04:01:48 +0000
+++ b/Mailman/tests/test_documentation.py 2008-02-27 02:24:13 +0000
@@ -52,8 +52,7 @@
def setup(testobj):
- """Set up some things for convenience."""
- testobj.globs['config'] = config
+ """Test setup."""
testobj.globs['message_from_string'] = specialized_message_from_string
--
Primary development focus
https://code.launchpad.net/~mailman-coders/mailman/3.0
You are receiving this branch notification because you are subscribed to it.
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe:
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org