From eaf03ee16bbebd5ceb5d9116ff8ebcd6a37fbc96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20=28kix=29?= Date: Sun, 30 Aug 2020 11:41:24 +0200 Subject: [PATCH] test_01_basic indentation issues This patch reformat some blocks in test_01_basic to setup the rigth indentation. --- test/tests/test_01_basic.py | 47 +++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/test/tests/test_01_basic.py b/test/tests/test_01_basic.py index 79ced64..9202a7b 100644 --- a/test/tests/test_01_basic.py +++ b/test/tests/test_01_basic.py @@ -56,9 +56,10 @@ class TestBasicFunctions(unittest.TestCase): code, res = OLITestLib.run_OLI() self.assertEqual(res, "") boxes, mails = OLITestLib.count_maildir_mails('') - self.assertTrue((boxes, mails) == (0, 0), msg="Expected 0 folders and 0 " - "mails, but sync led to {0} folders and {1} mails".format( - boxes, mails)) + self.assertTrue((boxes, mails) == (0, 0), + msg="Expected 0 folders and 0 " + "mails, but sync led to {0} folders and {1} mails" + .format(boxes, mails)) def test_02_createdir(self): """Create local 'OLItest 1', sync""" @@ -67,9 +68,10 @@ class TestBasicFunctions(unittest.TestCase): code, res = OLITestLib.run_OLI() self.assertEqual(res, "") boxes, mails = OLITestLib.count_maildir_mails('') - self.assertTrue((boxes, mails) == (1, 0), msg="Expected 1 folders and 0 " - "mails, but sync led to {0} folders and {1} mails".format( - boxes, mails)) + self.assertTrue((boxes, mails) == (1, 0), + msg="Expected 1 folders and 0 " + "mails, but sync led to {0} folders and {1} mails" + .format(boxes, mails)) def test_03_createdir_quote(self): """Create local 'OLItest "1"' maildir, sync @@ -83,9 +85,10 @@ class TestBasicFunctions(unittest.TestCase): raise unittest.SkipTest("remote server doesn't handle quote") self.assertEqual(res, "") boxes, mails = OLITestLib.count_maildir_mails('') - self.assertTrue((boxes, mails) == (1, 0), msg="Expected 1 folders and 0 " - "mails, but sync led to {0} folders and {1} mails".format( - boxes, mails)) + self.assertTrue((boxes, mails) == (1, 0), + msg="Expected 1 folders and 0 " + "mails, but sync led to {0} folders and {1} mails" + .format(boxes, mails)) def test_04_nametransmismatch(self): """Create mismatching remote and local nametrans rules @@ -101,9 +104,10 @@ class TestBasicFunctions(unittest.TestCase): # logging.warn("%s %s "% (code, res)) # We expect an INFINITE FOLDER CREATION WARNING HERE.... mismatch = "ERROR: INFINITE FOLDER CREATION DETECTED!" in res - self.assertEqual(mismatch, True, msg="Mismatching nametrans rules did " - "NOT trigger an 'infinite folder generation' error. Output was:\n" - "{0}".format(res)) + self.assertEqual(mismatch, True, + msg="Mismatching nametrans rules did " + "NOT trigger an 'infinite folder generation' error. Output was:\n" + "{0}".format(res)) # Write out default config file again OLITestLib.write_config_file() @@ -121,13 +125,15 @@ class TestBasicFunctions(unittest.TestCase): # logging.warn("%s %s "% (code, res)) self.assertEqual(res, "") boxes, mails = OLITestLib.count_maildir_mails('') - self.assertTrue((boxes, mails) == (1, 1), msg="Expected 1 folders and 1 " - "mails, but sync led to {0} folders and {1} mails".format( - boxes, mails)) + self.assertTrue((boxes, mails) == (1, 1), + msg="Expected 1 folders and 1 " + "mails, but sync led to {0} folders and {1} mails" + .format(boxes, mails)) # The local Mail should have been assigned a proper UID now, check! uids = OLITestLib.get_maildir_uids('INBOX.OLItest') - self.assertFalse(None in uids, msg="All mails should have been " + \ - "assigned the IMAP's UID number, but {0} messages had no valid ID " \ + self.assertFalse(None in uids, + msg="All mails should have been " + "assigned the IMAP's UID number, but {0} messages had no valid ID " .format(len([None for x in uids if x is None]))) def test_06_createfolders(self): @@ -154,6 +160,7 @@ class TestBasicFunctions(unittest.TestCase): code, res = OLITestLib.run_OLI() self.assertEqual(res, "") boxes, mails = OLITestLib.count_maildir_mails('') - self.assertTrue((boxes, mails) == (0, 0), msg="Expected 0 folders and 0 " - "mails, but sync led to {} folders and {} mails".format( - boxes, mails)) + self.assertTrue((boxes, mails) == (0, 0), + msg="Expected 0 folders and 0 " + "mails, but sync led to {} folders and {} mails" + .format(boxes, mails))