hjtran opened a new pull request, #30771:
URL: https://github.com/apache/beam/pull/30771

   These changes just extend `assert_that` to accommodate a couple of common 
footguns I've seen.
   
   - `assert_that` will now check to see if you're calling it with a pipeline 
that has already been run. This catches the following circumstance:
   ```
   with beam.Pipeline() as p:
       my_pcoll = p | # ...
   assert_that(my_pcoll, equal_to([1,2,3]) # should've been indented
   ```
   
   - `assert_that` automatically creates a unique label if the label it's given 
is already taken. Usually when writing unit tests, we don't really need very 
specific labels for assertions. When this comes up, we usually have to just 
manually increment every assertion which is quite tedious.


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to