[ https://issues.apache.org/jira/browse/BEAM-7389?focusedWorklogId=289229&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-289229 ]
ASF GitHub Bot logged work on BEAM-7389: ---------------------------------------- Author: ASF GitHub Bot Created on: 05/Aug/19 22:13 Start Date: 05/Aug/19 22:13 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_r310813218 ########## 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: Does this only validate that, process lines are in the output? Does it check for other lines? ---------------------------------------------------------------- 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: 289229) Time Spent: 32h (was: 31h 50m) > 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: 32h > Remaining Estimate: 0h > -- This message was sent by Atlassian JIRA (v7.6.14#76016)