Re: [Tutor] How to use setUpmodule() variables in tests?

2016-05-07 Thread Steven D'Aprano
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 lo

[Tutor] How to use setUpmodule() variables in tests?

2016-05-07 Thread ramakrishna reddy
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 class A(unittest.TestCase): def testa(self): a = 10 print(a + b) if __name__ ==