-
Notifications
You must be signed in to change notification settings - Fork 43
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
Silence 7zip when unpacking #143
base: master
Are you sure you want to change the base?
Conversation
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.
can you bump the version so i can tag also?
test/post_fetch_helpers.jl
Outdated
end | ||
|
||
@testset "sad case" begin | ||
@test_throws Exception unpack("assets/non-existent.zip") |
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.
I think this is spelt wrong but:
@test_throws Exception unpack("assets/non-existent.zip") | |
# depending on Julia version maybe ErrorException or ProcessExittedExcept | |
@test_throws Union{ErrorException,ProcessExittedException} unpack("assets/non-existent.zip") |
std = stdout | ||
r, w = redirect_stdout() | ||
try | ||
f() | ||
finally | ||
redirect_stdout(std) | ||
close(w) | ||
end | ||
output = read(r, String) | ||
return output |
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.
Can't we do: const capture_stdout = sprint ∘ redirect_stdout
?
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.
interesting, let me look into that (copy pasting this results in an error, but may be workable)
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.
I still think there must be a much shorter way to do this.
Did you get a chance to look at it?
Fixes #142