-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove unnecessary process wait on MacOS (issue #1523) #1526
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
"""Utilities for HTTPie test suite.""" | ||
import re | ||
import shlex | ||
import os | ||
import sys | ||
import time | ||
|
@@ -205,16 +204,9 @@ class BaseCLIResponse: | |
devnull: str = None | ||
json: dict = None | ||
exit_status: ExitStatus = None | ||
command: str = None | ||
args: List[str] = [] | ||
complete_args: List[str] = [] | ||
|
||
@property | ||
def command(self): | ||
cmd = ' '.join(shlex.quote(arg) for arg in ['http', *self.args]) | ||
# pytest-httpbin to real httpbin. | ||
return re.sub(r'127\.0\.0\.1:\d+', 'httpbin.org', cmd) | ||
|
||
Comment on lines
-212
to
-217
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pycodestyle (flake) complains that this redefines the While it would be possible to correct that by removing the property from the list (and possibly adding |
||
@classmethod | ||
def from_raw_data(self, data: Union[str, bytes]) -> 'BaseCLIResponse': | ||
if isinstance(data, bytes): | ||
|
@@ -448,7 +440,6 @@ def dump_stderr(): | |
if r.exit_status != ExitStatus.SUCCESS: | ||
sys.stderr.write(r.stderr) | ||
|
||
# print(f'\n\n$ {r.command}\n') | ||
return r | ||
|
||
finally: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Waited for the process and could send some data to it or return its return code - but nothing of the sort is being done, basically blocking until the process finishes. But since the purpose of the process is to be daemonized (or is possibly daemonized already), it doesn't seem to make sense.