pitrou commented on code in PR #14832:
URL: https://github.com/apache/arrow/pull/14832#discussion_r1039762208
##########
python/pyarrow/tests/conftest.py:
##########
@@ -184,9 +184,16 @@ def gcs_server():
args = [sys.executable, '-m', 'testbench', '--port', str(port)]
proc = None
try:
+ # check first if testbench module is available
+ import testbench # noqa:F401
+ # start server
proc = subprocess.Popen(args, env=env)
- except OSError as e:
+ # Make sure the server is alive.
+ assert proc.poll() is None
+ except (ModuleNotFoundError, OSError) as e:
pytest.skip(f"Command {args} failed to execute: {e}")
+ except AssertionError as e:
Review Comment:
I would rather have an explicit `if` rather than an assert:
```suggestion
if proc.poll() is not None:
```
--
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]