-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This fixes the edge case when py.test arguments contained quoted strings with spaces, e.g.: ptw -- -m 'not slow'
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,7 @@ def run(self, filename=None): | |
print(Fore.CYAN + msg.format(Fore.LIGHTCYAN_EX + arg + Fore.CYAN) + Fore.RESET) | ||
if self.auto_clear: | ||
print() | ||
exit_code = subprocess.call(command, shell=True) | ||
exit_code = subprocess.call(['py.test'] + self.args, shell=False) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
aldanor
Author
Owner
|
||
passed = exit_code == 0 | ||
|
||
# Beep if failed | ||
|
3 comments
on commit dc066e2
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.
@joeyespo Just checked it out, seems to work fine so far. Calling pytest.main
directly seems like the way to go.
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.
👍
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.
Thank you!
Hmm. Does this have any other side effects? I used
shell
for a reason, but can't think of it off the top of my head right now.Also,
shell=False
is the default, so can probably just remove that arg altogether.