On Fri, May 06, 2016 at 09:41:18PM -0700, ramakrishna reddy wrote: > Dear All, > > In unittesting in python, how can I use variables of setUpModule() in tests? > > example: > > import unittest > > def setUpModule(): > b = 20 #----> how can I use this variable in testa print
b here is a local variable. If you want it to be seen outside of the setUpModule function, you have to make it a global variable. -- Steve _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor