setUp() is a convenience method and doesn't have to be used. Instead of (or in addition to) using the setUp() method, you can use your own setup method and call it directly from each test, e.g.,
class MyTests(unittest.TestCase):
def _setup(self, my_arg):
# do something with my_arg
def test_1(self):
self._setup(my_arg='foo')
# do the test
def test_2(self):
self._setup(my_arg='bar')
# do the test