summaryrefslogtreecommitdiff
path: root/src/mailman/bin/tests
diff options
context:
space:
mode:
authorBarry Warsaw2016-03-24 09:55:18 -0400
committerBarry Warsaw2016-03-24 09:55:18 -0400
commitce9370a537683e6e4e934b8018d0fe3f2aa7f9ac (patch)
tree1c5ac62d66cfa75d6bf7abfb737ae401b49df2a8 /src/mailman/bin/tests
parent8169b60bc3d5b771f3676ae12c65f6f92c67a76a (diff)
downloadmailman-ce9370a537683e6e4e934b8018d0fe3f2aa7f9ac.tar.gz
mailman-ce9370a537683e6e4e934b8018d0fe3f2aa7f9ac.tar.zst
mailman-ce9370a537683e6e4e934b8018d0fe3f2aa7f9ac.zip
Clean up the bin directory.
Diffstat (limited to 'src/mailman/bin/tests')
-rw-r--r--src/mailman/bin/tests/test_mailman.py6
-rw-r--r--src/mailman/bin/tests/test_master.py13
2 files changed, 2 insertions, 17 deletions
diff --git a/src/mailman/bin/tests/test_mailman.py b/src/mailman/bin/tests/test_mailman.py
index 282432030..7c9d2f2bc 100644
--- a/src/mailman/bin/tests/test_mailman.py
+++ b/src/mailman/bin/tests/test_mailman.py
@@ -17,11 +17,6 @@
"""Test mailman command utilities."""
-__all__ = [
- 'TestMailmanCommand',
- ]
-
-
import unittest
from io import StringIO
@@ -29,7 +24,6 @@ from mailman.bin.mailman import main
from unittest.mock import patch
-
class TestMailmanCommand(unittest.TestCase):
def test_mailman_command_without_subcommand_prints_help(self):
# Issue #137: Running `mailman` without a subcommand raises an
diff --git a/src/mailman/bin/tests/test_master.py b/src/mailman/bin/tests/test_master.py
index 50f4d1ab5..32dbbceed 100644
--- a/src/mailman/bin/tests/test_master.py
+++ b/src/mailman/bin/tests/test_master.py
@@ -17,22 +17,16 @@
"""Test master watcher utilities."""
-__all__ = [
- 'TestMasterLock',
- ]
-
-
import os
-import errno
import tempfile
import unittest
+from contextlib import suppress
from datetime import timedelta
from flufl.lock import Lock
from mailman.bin import master
-
class TestMasterLock(unittest.TestCase):
def setUp(self):
fd, self.lock_file = tempfile.mkstemp()
@@ -43,11 +37,8 @@ class TestMasterLock(unittest.TestCase):
def tearDown(self):
# Unlocking removes the lock file, but just to be safe (i.e. in case
# of errors).
- try:
+ with suppress(FileNotFoundError):
os.remove(self.lock_file)
- except OSError as error:
- if error.errno != errno.ENOENT:
- raise
def test_acquire_lock_1(self):
lock = master.acquire_lock_1(False, self.lock_file)