def main(): fileLogger.info('This is info from main function Entry') fileLogger.warning('This is warn from main function') fileLogger.error('This is error from main function') m1.f1() m1.f2() m2.f3() m2.f4() m3.f5() m4.f6() fileLogger.info('This is info from main function Exit') return
def test_m1_2(): assert m1.f1(4) == 5
def test_m1_1(): assert m1.f1(5) == 6
"propagate": False } }, "root": { "level": "DEBUG", "handlers": ["console", "main"], 'propagate':False } } if __name__=='__main__': logger=logging.config.dictConfig(config) logger=logging.getLogger(__name__) logger.error("This is a log from main at ERROR level") logger.warning("This is a log from main at ERROR level") logger.info("Entering Main") m1.f1() m1.f2() m2.f3() m2.f4() m3.f5() m4.f6() logger.error("Exiting Main")
def f2(num): num2 = m1.f1(num) return num2 + 1