mirror of https://github.com/CIRCL/PyCIRCLean
Print logs after each tests.
parent
2669e80ca9
commit
975ed03e38
|
@ -21,29 +21,37 @@ class TestBasic(unittest.TestCase):
|
||||||
self.maxDiff = None
|
self.maxDiff = None
|
||||||
self.curpath = os.getcwd()
|
self.curpath = os.getcwd()
|
||||||
|
|
||||||
|
def dump_logs(self):
|
||||||
|
logfile = os.path.join(self.curpath, 'tests/dst/logs/processing.log')
|
||||||
|
print(open(logfile, 'rb').read())
|
||||||
|
|
||||||
def test_specific_valid(self):
|
def test_specific_valid(self):
|
||||||
src = os.path.join(self.curpath, 'tests/src2')
|
src = os.path.join(self.curpath, 'tests/src2')
|
||||||
dst = os.path.join(self.curpath, 'tests/dst')
|
dst = os.path.join(self.curpath, 'tests/dst')
|
||||||
spec = KittenGroomerSpec(src, dst)
|
spec = KittenGroomerSpec(src, dst)
|
||||||
spec.processdir()
|
spec.processdir()
|
||||||
|
self.dump_logs()
|
||||||
|
|
||||||
def test_specific_invalid(self):
|
def test_specific_invalid(self):
|
||||||
src = os.path.join(self.curpath, 'tests/src')
|
src = os.path.join(self.curpath, 'tests/src')
|
||||||
dst = os.path.join(self.curpath, 'tests/dst')
|
dst = os.path.join(self.curpath, 'tests/dst')
|
||||||
spec = KittenGroomerSpec(src, dst)
|
spec = KittenGroomerSpec(src, dst)
|
||||||
spec.processdir()
|
spec.processdir()
|
||||||
|
self.dump_logs()
|
||||||
|
|
||||||
def test_pier9(self):
|
def test_pier9(self):
|
||||||
src = os.path.join(self.curpath, 'tests/src')
|
src = os.path.join(self.curpath, 'tests/src')
|
||||||
dst = os.path.join(self.curpath, 'tests/dst')
|
dst = os.path.join(self.curpath, 'tests/dst')
|
||||||
spec = KittenGroomerPier9(src, dst)
|
spec = KittenGroomerPier9(src, dst)
|
||||||
spec.processdir()
|
spec.processdir()
|
||||||
|
self.dump_logs()
|
||||||
|
|
||||||
def test_generic(self):
|
def test_generic(self):
|
||||||
src = os.path.join(self.curpath, 'tests/src')
|
src = os.path.join(self.curpath, 'tests/src')
|
||||||
dst = os.path.join(self.curpath, 'tests/dst')
|
dst = os.path.join(self.curpath, 'tests/dst')
|
||||||
spec = KittenGroomer(src, dst)
|
spec = KittenGroomer(src, dst)
|
||||||
spec.processdir()
|
spec.processdir()
|
||||||
|
self.dump_logs()
|
||||||
|
|
||||||
def test_filecheck(self):
|
def test_filecheck(self):
|
||||||
if sys.version_info.major >= 3:
|
if sys.version_info.major >= 3:
|
||||||
|
@ -52,6 +60,7 @@ class TestBasic(unittest.TestCase):
|
||||||
dst = os.path.join(self.curpath, 'tests/dst')
|
dst = os.path.join(self.curpath, 'tests/dst')
|
||||||
spec = KittenGroomerFileCheck(src, dst)
|
spec = KittenGroomerFileCheck(src, dst)
|
||||||
spec.processdir()
|
spec.processdir()
|
||||||
|
self.dump_logs()
|
||||||
|
|
||||||
def test_help_file(self):
|
def test_help_file(self):
|
||||||
f = FileBase('tests/src/blah.conf', 'tests/dst/blah.conf')
|
f = FileBase('tests/src/blah.conf', 'tests/dst/blah.conf')
|
||||||
|
|
Loading…
Reference in New Issue