forked from conda-forge/apache-beam-feedstock
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This should chatch the issue in conda-forge#67 if it hasn't been solved yet.
- Loading branch information
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import apache_beam as beam | ||
from apache_beam.testing.test_pipeline import TestPipeline | ||
from apache_beam.testing.util import assert_that | ||
|
||
|
||
def expected_nums(): | ||
def _expected_nums(actual): | ||
assert actual[0] == 0 | ||
assert actual[1] == 1 | ||
|
||
return _expected_nums | ||
|
||
|
||
def test_pipeline_without_assert_that(): | ||
with TestPipeline() as p: | ||
_ = p | beam.Create([0, 1]) | ||
|
||
|
||
def test_assert_that(): | ||
with TestPipeline() as p: | ||
nums = p | beam.Create([0, 1]) | ||
assert_that(nums, expected_nums()) | ||
|