diff options
| author | bwarsaw | 2006-05-18 13:04:26 +0000 |
|---|---|---|
| committer | bwarsaw | 2006-05-18 13:04:26 +0000 |
| commit | cc6f8eab8283680546216564cfffbb5ded5d52fd (patch) | |
| tree | 19f685b4ac1e9a4fa4e1b4258d351fa55978e2d8 /tests/test_lockfile.py | |
| parent | faa8b0fa87ab3bf276154f9a932055a3af3321ff (diff) | |
| download | mailman-cc6f8eab8283680546216564cfffbb5ded5d52fd.tar.gz mailman-cc6f8eab8283680546216564cfffbb5ded5d52fd.tar.zst mailman-cc6f8eab8283680546216564cfffbb5ded5d52fd.zip | |
Reorganize the unit test infrastructure, so that tests live inside the
Mailman
top level package. Rewrote the test runner and stuck it in bin (as an
mmshell
symlink). bin/testall now autodetects tests and allows running a
subset of
tests via regular expression filtering.
I also fixed all the tests so they all pass now, with the exception of
test_message.py tests. These still doesn't work because of coordination
issues between its smtpd-based reader and SMTPDirect, but... I have a
plan
(mwah, ha, ha! :)
I also fixed a code update bug in Decorate.py
Diffstat (limited to 'tests/test_lockfile.py')
| -rw-r--r-- | tests/test_lockfile.py | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/tests/test_lockfile.py b/tests/test_lockfile.py deleted file mode 100644 index 832e745f9..000000000 --- a/tests/test_lockfile.py +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (C) 2002 by the Free Software Foundation, Inc. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -"""Unit tests for the LockFile class. -""" - -import unittest - -from Mailman.LockFile import LockFile - -LOCKFILE_NAME = '/tmp/.mm-test-lock' - - - -class TestLockFile(unittest.TestCase): - def test_two_lockfiles_same_proc(self): - lf1 = LockFile(LOCKFILE_NAME) - lf2 = LockFile(LOCKFILE_NAME) - lf1.lock() - self.failIf(lf2.locked()) - - - -def suite(): - suite = unittest.TestSuite() - suite.addTest(unittest.makeSuite(TestLockFile)) - return suite - - - -if __name__ == '__main__': - unittest.main(defaultTest='suite') |
