1
0
Fork 0
mirror of https://git.code.sf.net/p/archivemail/code synced 2024-12-22 07:42:55 +00:00

test suite: fix buggy test of --suffix and --prefix option parsing

This commit is contained in:
Nikolaus Schulz 2010-07-31 17:43:46 +02:00
parent 0921a1c91a
commit 04bf8eaa23

View file

@ -421,7 +421,7 @@ class TestOptionParser(unittest.TestCase):
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], "")
self.assertEqual(archivemail.options.archive_suffix, suffix) self.assertEqual(archivemail.options.archive_suffix, suffix)
archivemail.options.suffix = None archivemail.options.archive_suffix = None
archivemail.options.parse_args(["-s", suffix], "") archivemail.options.parse_args(["-s", suffix], "")
self.assertEqual(archivemail.options.archive_suffix, suffix) self.assertEqual(archivemail.options.archive_suffix, suffix)
@ -430,7 +430,7 @@ class TestOptionParser(unittest.TestCase):
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], "")
self.assertEqual(archivemail.options.archive_prefix, prefix) self.assertEqual(archivemail.options.archive_prefix, prefix)
archivemail.options.prefix = None archivemail.options.archive_prefix = None
archivemail.options.parse_args(["-p", prefix], "") archivemail.options.parse_args(["-p", prefix], "")
self.assertEqual(archivemail.options.archive_prefix, prefix) self.assertEqual(archivemail.options.archive_prefix, prefix)