title: Python webdriver: reusing setUp and tearDown
body: <p>Hello can you give me example for reusing setUp and tearDown in another class for example</p>
  
  <p>base.py</p>
  
  <pre><code>from selenium import webdriver
  class Login(object):
    def setUp(self):
    # create a new Firefox session
     self.driver = webdriver.Firefox()
     self.driver.get("google.com")
     self.driver.implicitly_wait(30)
     self.driver.maximize_window()
  
    def tearDown(self):
      self.driver.quit()
  </code></pre>
  
  <p>login.py</p>
  
  <pre><code>from selenium import webdriver
  import base
  import unittest
  
  class LoginPage(unittest.TestCase):
   ...how to call setUp() and tearDown() from base.py...
      def test_logn(self):
          self.driver.find_element_by_id('username')
       ...etc...
  </code></pre>
  
  <p>Can you provide example please to run it on pc and see how it works.Thank you</p>