TheNeuralBit commented on a change in pull request #12440:
URL: https://github.com/apache/beam/pull/12440#discussion_r466688418
##########
File path: sdks/python/apache_beam/dataframe/doctests.py
##########
@@ -290,34 +298,60 @@ def to_callable(cond):
super(BeamDataframeDoctestRunner, self).__init__(
checker=_DeferrredDataframeOutputChecker(self._test_env, use_beam),
**kwargs)
+ self.skipped = 0
+ self.wont_implement = 0
def run(self, test, **kwargs):
self._checker.reset()
- if test.name in self._skip:
- for example in test.examples:
- if any(should_skip(example) for should_skip in self._skip[test.name]):
- example.source = 'pass'
- example.want = ''
for example in test.examples:
- if example.exc_msg is None:
+ if any(should_skip(example)
+ for should_skip in self._skip.get(test.name, [])):
+ example.source = 'pass'
+ example.want = ''
+ self.skipped += 1
+ elif example.exc_msg is None and any(
+ wont_implement(example)
+ for wont_implement in self._wont_implement.get(test.name, [])):
# Don't fail doctests that raise this error.
example.exc_msg = (
'apache_beam.dataframe.frame_base.WontImplementError: ...')
+ self.wont_implement += 1
with self._test_env.context():
- return super(BeamDataframeDoctestRunner, self).run(test, **kwargs)
+ result = super(BeamDataframeDoctestRunner, self).run(test, **kwargs)
+ return result
def fake_pandas_module(self):
return self._test_env.fake_pandas_module()
+ def summarize(self):
+ super(BeamDataframeDoctestRunner, self).summarize()
+ if self.failures:
+ return
Review comment:
I added this because I wasn't sure how to accurately report the stats in
the case of failures. In theory one of the wont implement tests could fail,
then skipped/wont implement/passed/failed wouldn't be a partitioning of tries.
If there's a way to get specific information about the wont implement test
cases we could de-dup it though.
----------------------------------------------------------------
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:
[email protected]