Reformat offlineimap/test/tests/ all tests

Add some spaces, remove lines,... now format is better (lintian).
This commit is contained in:
Rodolfo García Peñas (kix) 2020-08-29 20:27:10 +02:00
parent d75cf8d80c
commit bcc497df16
5 changed files with 99 additions and 93 deletions

View File

@ -1 +0,0 @@

View File

@ -4,6 +4,7 @@
from offlineimap import globals from offlineimap import globals
import unittest import unittest
class Opt: class Opt:
def __init__(self): def __init__(self):
self.one = "baz" self.one = "baz"

View File

@ -27,15 +27,18 @@ from test.OLItest import OLITestLib
if not OLITestLib.cred_file: if not OLITestLib.cred_file:
OLITestLib(cred_file='./test/credentials.conf', cmd='./offlineimap.py') OLITestLib(cred_file='./test/credentials.conf', cmd='./offlineimap.py')
def setUpModule(): def setUpModule():
logging.info("Set Up test module %s" % __name__) logging.info("Set Up test module %s" % __name__)
tdir = OLITestLib.create_test_dir(suffix=__name__) tdir = OLITestLib.create_test_dir(suffix=__name__)
def tearDownModule(): def tearDownModule():
logging.info("Tear Down test module") logging.info("Tear Down test module")
# comment out next line to keep testdir after test runs. TODO: make nicer # comment out next line to keep testdir after test runs. TODO: make nicer
OLITestLib.delete_test_dir() OLITestLib.delete_test_dir()
# Stuff that can be used # Stuff that can be used
# self.assertEqual(self.seq, range(10)) # self.assertEqual(self.seq, range(10))
# should raise an exception for an immutable sequence # should raise an exception for an immutable sequence

View File

@ -29,10 +29,12 @@ def setUpModule():
logging.info("Set Up test module %s" % __name__) logging.info("Set Up test module %s" % __name__)
tdir = OLITestLib.create_test_dir(suffix=__name__) tdir = OLITestLib.create_test_dir(suffix=__name__)
def tearDownModule(): def tearDownModule():
logging.info("Tear Down test module") logging.info("Tear Down test module")
OLITestLib.delete_test_dir() OLITestLib.delete_test_dir()
# Stuff that can be used # Stuff that can be used
# self.assertEqual(self.seq, range(10)) # self.assertEqual(self.seq, range(10))
# should raise an exception for an immutable sequence # should raise an exception for an immutable sequence
@ -107,7 +109,6 @@ class TestBasicFunctions(unittest.TestCase):
# Write out default config file again # Write out default config file again
OLITestLib.write_config_file() OLITestLib.write_config_file()
def test_05_createmail(self): def test_05_createmail(self):
"""Create mail in OLItest 1, sync, wipe folder sync """Create mail in OLItest 1, sync, wipe folder sync

View File

@ -29,10 +29,12 @@ def setUpModule():
logging.info("Set Up test module %s" % __name__) logging.info("Set Up test module %s" % __name__)
tdir = OLITestLib.create_test_dir(suffix=__name__) tdir = OLITestLib.create_test_dir(suffix=__name__)
def tearDownModule(): def tearDownModule():
logging.info("Tear Down test module") logging.info("Tear Down test module")
OLITestLib.delete_test_dir() OLITestLib.delete_test_dir()
# Stuff that can be used # Stuff that can be used
# self.assertEqual(self.seq, range(10)) # self.assertEqual(self.seq, range(10))
# should raise an exception for an immutable sequence # should raise an exception for an immutable sequence