Пример #1
0
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
Пример #2
0
def test_m1_2():
    assert m1.f1(4) == 5
Пример #3
0
def test_m1_1():
    assert m1.f1(5) == 6
Пример #4
0
            "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")




Пример #5
0
def f2(num):
    num2 = m1.f1(num)
    return num2 + 1
Пример #6
0
def test_m1_2():
    assert m1.f1(4) == 5
Пример #7
0
def test_m1_1():
    assert m1.f1(5) == 6