Fix Python – unittest Vs pytest
In unittest, I can setUp variables in a class and then the methods of this class can chose whichever variable it wants to use…
class test_class(unittest.TestCase):
def setUp(self):
self.varA = 1
self.varB = 2
self.varC = 3
self.modified_varA = 2
def test_1(self):
do_something_with_self.var….