BigJerBD commented on PR #17455:
URL: https://github.com/apache/beam/pull/17455#issuecomment-1114294629
This could be done to simplify some tests that patches on the module level
```python
# in sdks/python/apache_beam/io/gcp/gcsfilesystem_test.py
@mock.patch('apache_beam.io.gcp.gcsfilesystem.gcsio') # this could be
removed
def test_create(self, mock_gcsio):
# Prepare mocks.
gcsio_mock = mock.MagicMock()
gcsfilesystem.gcsio.GcsIO = lambda: gcsio_mock # this would become:
self.fs.get_gcsio = lambda: gcsio_mock
...
```
Would it be enough?
it might looks irrelevant but at the very least sdk users using those
classes directly do not have to patch modules to override some gcsio.GcsIO
properties if considered necessary
--
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]