コード例 #1
0
ファイル: test_runner.py プロジェクト: xaoei/zulip
 def startTest(self, test: TestCase) -> None:
     TestResult.startTest(self, test)
     self.stream.writeln(
         "Running {}".format(full_test_name(test))
     )  # type: ignore # https://github.com/python/typeshed/issues/3139
     self.stream.flush(
     )  # type: ignore # https://github.com/python/typeshed/issues/3139
コード例 #2
0
ファイル: test_runner.py プロジェクト: zackw/zulip
 def startTest(self, test: TestCase) -> None:
     TestResult.startTest(self, test)
     self.stream.writeln(
         f"Running {full_test_name(test)}"
     )  # type: ignore[attr-defined] # https://github.com/python/typeshed/issues/3139
     self.stream.flush(
     )  # type: ignore[attr-defined] # https://github.com/python/typeshed/issues/3139
コード例 #3
0
ファイル: result.py プロジェクト: Ozahata/pddoctest
 def startTest(self, test):
     """
     Starting the test we redirect the output to not show in the screen
     """
     TestResult.startTest(self, test)
     # Start a new output text result
     self.output = StringIO()
     self._stdout.fp = self.output
     self._stderr.fp = self.output
     # Conserve the original output
     self.org_stderr = sys.stderr
     self.org_stdout = sys.stdout
     sys.stdout = self._stdout
     sys.stderr = self._stderr
     # Define the structure
     self.class_name = test.__class__.__name__
     self.method_name = test._testMethodName
     if self.class_name not in self.result["class_list"].keys():
         class_doc = [] if test.__doc__ is None else \
                     [ item.strip() for item in test.__doc__.splitlines() \
                       if item.strip() != "" ]
         self.result["class_list"][self.class_name] = {
                                    "module": test.__module__,
                                    "description": class_doc,
                                    "success_count": 0,
                                    "error_count": 0,
                                    "failure_count": 0,
                                    "skip_count": 0,
                                    "expected_failure_count": 0,
                                    "unexpected_success_count": 0,
                                    "methods": {}
                                    }
     if self.method_name not in \
         self.result["class_list"][self.class_name]["methods"].keys():
         method_doc = [""] if test._testMethodDoc is None else \
                     [ item.strip() for item in \
                      test._testMethodDoc.splitlines() if item.strip() != ""
                      ]
         self.result["class_list"][self.class_name]["methods"][self.method_name] = \
                 {
                  "started": datetime.now(),
                  "status": None,
                  "stopped": None,
                  "message": "",
                  "error": None,
                  "description": method_doc
                  }
コード例 #4
0
 def startTest(self, test):
     # type: (TestCase) -> None
     TestResult.startTest(self, test)
     self.stream.writeln("Running {}".format(full_test_name(test)))
     self.stream.flush()
コード例 #5
0
ファイル: test_runner.py プロジェクト: kagonlineteam/zulip
 def startTest(self, test: TestCase) -> None:
     TestResult.startTest(self, test)
     self.stream.write(f"Running {test.id()}\n")
     self.stream.flush()
コード例 #6
0
ファイル: test_runner.py プロジェクト: joydeep1701/zulip
 def startTest(self, test: TestCase) -> None:
     TestResult.startTest(self, test)
     self.stream.writeln("Running {}".format(full_test_name(test)))
     self.stream.flush()
コード例 #7
0
ファイル: test.py プロジェクト: pombredanne/genutility
 def startTest(self, test):
     self.current_test += 1
     TestResult.startTest(self, test)
     self.progress()