You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/09/29 23:53:54 UTC

[GitHub] [beam] robertwb commented on a change in pull request #12819: [BEAM-9561] Initial framework for testing pandas website docs.

robertwb commented on a change in pull request #12819:
URL: https://github.com/apache/beam/pull/12819#discussion_r497155488



##########
File path: sdks/python/apache_beam/dataframe/doctests.py
##########
@@ -350,16 +355,57 @@ def fake_pandas_module(self):
 
   def summarize(self):
     super(BeamDataframeDoctestRunner, self).summarize()
+    self.summary().summarize()
 
+  def summary(self):
+    return Summary(
+        self.failures,
+        self.tries,
+        self.skipped,
+        self.wont_implement,
+        self._wont_implement_reasons)
+
+
+class AugmentedTestResults(doctest.TestResults):
+  pass
+
+
+class Summary(object):
+  def __init__(
+      self,
+      failures=0,
+      tries=0,
+      skipped=0,
+      wont_implement=0,
+      wont_implement_reasons=None):
+    self.failures = failures
+    self.tries = tries
+    self.skipped = skipped
+    self.wont_implement = wont_implement
+    self.wont_implement_reasons = wont_implement_reasons or []
+
+  def __add__(self, other):
+    return Summary(
+        self.failures + other.failures,
+        self.tries + other.tries,
+        self.skipped + other.skipped,
+        self.wont_implement + other.wont_implement,
+        self.wont_implement_reasons + other.wont_implement_reasons)

Review comment:
       Yeah, we could probably do something with a test-class-level aggregator. https://issues.apache.org/jira/browse/BEAM-10989




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org