From 7ebd22d96eab9fbc3d6180ea6697c7a86ad08657 Mon Sep 17 00:00:00 2001 Message-Id: <7ebd22d96eab9fbc3d6180ea6697c7a86ad08657.1713284848.git.mdw@distorted.org.uk> From: Mark Wooding Date: Wed, 21 Nov 2007 10:44:34 +0000 Subject: [PATCH] borrow some test naming conventions from disorder.unicode Organization: Straylight/Edgeware From: Richard Kettlewell --- tests/dtest.py | 10 +++++----- tests/nothing.py | 3 +-- tests/version.py | 3 +-- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/tests/dtest.py b/tests/dtest.py index 552542a..11b6e8b 100644 --- a/tests/dtest.py +++ b/tests/dtest.py @@ -105,8 +105,8 @@ def stdtracks(): def notracks(): pass -def start(): - """start() +def start_daemon(): + """start_daemon() Start the daemon.""" global daemon @@ -119,8 +119,8 @@ Start the daemon.""" disorder._configfile = "%s/config" % testroot disorder._userconf = False -def stop(): - """stop() +def stop_daemon(): + """stop_daemon() Stop the daemon if it has not stopped already""" global daemon @@ -163,7 +163,7 @@ def run(module=None, report=True): failures += 1 print e finally: - stop() + stop_daemon() if report: if failures: print " FAILED" diff --git a/tests/nothing.py b/tests/nothing.py index aeb0308..f3bdeb9 100755 --- a/tests/nothing.py +++ b/tests/nothing.py @@ -22,9 +22,8 @@ import dtest,time def test(): """Just start the server and then stop it a few seconds later""" - dtest.start() + dtest.start_daemon() time.sleep(2) - dtest.stop() if __name__ == '__main__': dtest.run() diff --git a/tests/version.py b/tests/version.py index 6fd42df..dbb0df6 100755 --- a/tests/version.py +++ b/tests/version.py @@ -22,12 +22,11 @@ import dtest,time,disorder def test(): """Ask the server its version number""" - dtest.start() + dtest.start_daemon() time.sleep(2) # give the daemon a chance to start up c = disorder.client() v = c.version() print "Server version: %s" % v - dtest.stop() if __name__ == '__main__': dtest.run() -- [mdw]