[ https://issues.apache.org/jira/browse/BEAM-7389?focusedWorklogId=292248&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-292248 ]
ASF GitHub Bot logged work on BEAM-7389: ---------------------------------------- Author: ASF GitHub Bot Created on: 09/Aug/19 21:09 Start Date: 09/Aug/19 21:09 Worklog Time Spent: 10m Work Description: aaltay commented on pull request #9257: [BEAM-7389] Add DoFn methods sample URL: https://github.com/apache/beam/pull/9257#discussion_r310835241 ########## File path: sdks/python/apache_beam/examples/snippets/transforms/element_wise/pardo_test.py ########## @@ -58,24 +58,44 @@ def check_dofn_params(actual): type(window) -> <class 'apache_beam.transforms.window.IntervalWindow'> window.start -> Timestamp(1584675660) (2020-03-20 03:41:00) window.end -> Timestamp(1584675690) (2020-03-20 03:41:30) -window.max_timestamp() -> Timestamp(1584675689.999999) (2020-03-20 03:41:29.999999)''' - # [END dofn_params] +window.max_timestamp() -> Timestamp(1584675689.999999) (2020-03-20 03:41:29.999999) +[END dofn_params]'''.splitlines()[1:-1]) # pylint: enable=line-too-long assert_that(actual, equal_to([dofn_params])) +def check_dofn_methods(actual): + results = '''[START results] +__init__ +setup +start_bundle +* process: 🍓 +* process: 🥕 +* process: 🍆 +* process: 🍅 +* process: 🥔 +* finish_bundle: 🌱🌳🌍 +teardown +[END results]'''.splitlines()[1:-1] + results = [line for line in results if line.startswith('*')] + assert_that(actual, equal_to(results)) Review comment: Sounds good. It does not really test dofn methods though. Also, does dofn methods work on all runners? If there are open JIRAs maybe we should list them here as a caution. ---------------------------------------------------------------- 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 292248) Time Spent: 39h 20m (was: 39h 10m) > Colab examples for element-wise transforms (Python) > --------------------------------------------------- > > Key: BEAM-7389 > URL: https://issues.apache.org/jira/browse/BEAM-7389 > Project: Beam > Issue Type: Improvement > Components: website > Reporter: Rose Nguyen > Assignee: David Cavazos > Priority: Minor > Time Spent: 39h 20m > Remaining Estimate: 0h > -- This message was sent by Atlassian JIRA (v7.6.14#76016)