test suite: replace some plain assertions with TestCase.assertEqual()

This commit is contained in:
Nikolaus Schulz 2010-07-31 17:08:06 +02:00
parent 40ba265fde
commit 0921a1c91a
1 changed files with 4 additions and 4 deletions

View File

@ -420,19 +420,19 @@ class TestOptionParser(unittest.TestCase):
"""--suffix and -s options are parsed correctly""" """--suffix and -s options are parsed correctly"""
for suffix in ("_static_", "_%B_%Y", "-%Y-%m-%d"): for suffix in ("_static_", "_%B_%Y", "-%Y-%m-%d"):
archivemail.options.parse_args(["--suffix="+suffix], "") archivemail.options.parse_args(["--suffix="+suffix], "")
assert archivemail.options.archive_suffix == suffix self.assertEqual(archivemail.options.archive_suffix, suffix)
archivemail.options.suffix = None archivemail.options.suffix = None
archivemail.options.parse_args(["-s", suffix], "") archivemail.options.parse_args(["-s", suffix], "")
assert archivemail.options.archive_suffix == suffix self.assertEqual(archivemail.options.archive_suffix, suffix)
def testOptionPrefix(self): def testOptionPrefix(self):
"""--prefix and -p options are parsed correctly""" """--prefix and -p options are parsed correctly"""
for prefix in ("_static_", "_%B_%Y", "-%Y-%m-%d"): for prefix in ("_static_", "_%B_%Y", "-%Y-%m-%d"):
archivemail.options.parse_args(["--prefix="+prefix], "") archivemail.options.parse_args(["--prefix="+prefix], "")
assert archivemail.options.archive_prefix == prefix self.assertEqual(archivemail.options.archive_prefix, prefix)
archivemail.options.prefix = None archivemail.options.prefix = None
archivemail.options.parse_args(["-p", prefix], "") archivemail.options.parse_args(["-p", prefix], "")
assert archivemail.options.archive_prefix == prefix self.assertEqual(archivemail.options.archive_prefix, prefix)
def testOptionDryrun(self): def testOptionDryrun(self):
"""--dry-run option is parsed correctly""" """--dry-run option is parsed correctly"""