Guest User

Untitled

a guest
Nov 12th, 2021
49
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class BasePage(object):
  2.      def __init__(self, driver, url) -> None:
  3.          super().__init__()
  4.          self.driver = driver
  5.          self.url = url
  6.          self.unwanted_method()
  7.  
  8.      def unwanted_method(self):
  9.           print("i dont want this")
  10.  
  11.      def say_fizz(self):
  12.           print('fizz')
  13.  
  14.      def say_buzz(self):
  15.           print('buzz')
  16.  
  17.  
  18. class MainPage(BasePage):
  19.      def __init__(self, driver, url) -> None:
  20.          self.driver = driver
  21.          self.url = url
  22.  
  23. if __name__ == '__main__':
  24.      print('-'*32)
  25.      baseobj = BasePage('driver', 'url')
  26.      print('-'*32)
  27.      obj = MainPage('driver', 'url')
  28.      obj.say_fizz()
  29.      obj.say_buzz()
RAW Paste Data