You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/07/12 22:28:25 UTC

[GitHub] [beam] pabloem commented on pull request #22233: Trying out property-based tests for Beam python coders

pabloem commented on PR #22233:
URL: https://github.com/apache/beam/pull/22233#issuecomment-1182555838

   Example of the sort of failures that these tests will find:
   ```
   dt = datetime.datetime(3002, 1, 1, 0, 0)
   >           lambda dt: Timestamp.from_utc_datetime(dt.astimezone(utc))),
           int: st.integers(min_value=-(1 << 64 - 1), max_value=1 << 64 - 1),
           np.int32: st.integers(min_value=-(1 << 31 - 1), max_value=1 << 31 - 1),
           np.int64: st.integers(min_value=-(1 << 64 - 1), max_value=1 << 64 - 1),
           np.uint32: st.integers(min_value=0, max_value=1 << 32 - 1),
           np.uint64: st.integers(min_value=0, max_value=1 << 65 - 1),
           bool: st.booleans()
       }
   E   OSError: [Errno 22] Invalid argument
   ```
   
   In this case, datetime in year 3002 is not supported? Taking a look...


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org