コード例 #1
0
ファイル: http_test.py プロジェクト: koo5/wget
 def __init__(self,
              name="Unnamed Test",
              pre_hook=None,
              test_params=None,
              post_hook=None,
              protocols=(HTTP, )):
     super(HTTPTest, self).__init__(name, pre_hook, test_params, post_hook,
                                    protocols)
     with self:
         # if any exception occurs, self.__exit__ will be immediately called
         self.server_setup()
         self.do_test()
         print_green('Test Passed.')
コード例 #2
0
ファイル: http_test.py プロジェクト: tech234a/wget-lua
 def begin(self):
     if not self.ready:
         # this is to maintain compatibility with scripts that
         # don't call setup()
         self.setup()
     with self:
         # If any exception occurs, self.__exit__ will be immediately called.
         # We must call the parent method in the end in order to verify
         # whether the tests succeeded or not.
         if self.ready:
             self.do_test()
             print_green("Test Passed.")
         else:
             self.tests_passed = False
         super(HTTPTest, self).begin()
コード例 #3
0
ファイル: http_test.py プロジェクト: AOSC-Dev/wget
 def begin(self):
     if not self.ready:
         # this is to maintain compatibility with scripts that
         # don't call setup()
         self.setup()
     with self:
         # If any exception occurs, self.__exit__ will be immediately called.
         # We must call the parent method in the end in order to verify
         # whether the tests succeeded or not.
         if self.ready:
             self.do_test()
             print_green("Test Passed.")
         else:
             self.tests_passed = False
         super(HTTPTest, self).begin()
コード例 #4
0
ファイル: http_test.py プロジェクト: Distrotech/wget
 def __init__(self,
              name="Unnamed Test",
              pre_hook=None,
              test_params=None,
              post_hook=None,
              protocols=(HTTP,)):
     super(HTTPTest, self).__init__(name,
                                    pre_hook,
                                    test_params,
                                    post_hook,
                                    protocols)
     with self:
         # if any exception occurs, self.__exit__ will be immediately called
         self.server_setup()
         self.do_test()
         print_green('Test Passed.')