Skip to content
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 whitespace in printing #158

Merged
merged 1 commit into from
Jul 3, 2023

Conversation

lgoettgens
Copy link
Collaborator

No description provided.

@codecov
Copy link

codecov bot commented Jul 1, 2023

Codecov Report

Merging #158 (5ddd55f) into master (94a9c7a) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #158   +/-   ##
=======================================
  Coverage   77.07%   77.07%           
=======================================
  Files          11       11           
  Lines         724      724           
=======================================
  Hits          558      558           
  Misses        166      166           
Flag Coverage Δ
unittests 77.07% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/ambiguities.jl 89.60% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@fingolfin
Copy link
Member

What does this affect? I don't understand the code enough to judge if this is right. I am happy to trust you and merge it, but a rough sketch on what's going on here and what it fixes would be nice

@lgoettgens
Copy link
Collaborator Author

This was introduced by mistake in https://github.com/JuliaTesting/Aqua.jl/pull/143/files.

In

Aqua.jl/src/ambiguities.jl

Lines 128 to 134 in 94a9c7a

out = Pipe()
err = Pipe()
succ = success(pipeline(cmd; stdout = out, stderr = err))
close(out.in)
close(err.in)
strout = String(read(out))
strerr = String(read(err))
, we run the ambiguity test in a subprocess and capture its stdout and stderr in two variables strout and strerr. The change now changes how we later print them to the user. The newline is not required there, as the captured stdout and stderr already include enough newlines.
You can see the difference by comparing the test out. In particular, between the reports of test_unbound_args.jl and test_undefined_exports.jl, you can see some newlines disappear with this change.

master:

Test Summary:        | Pass  Total  Time
test_unbound_args.jl |    4      4  1.3s

Skipping PkgWithUndefinedExports.undefined_name

Skipping PkgWithUndefinedExports.undefined_name
Test Summary:             | Pass  Total  Time
test_undefined_exports.jl |    4      4  0.9s

with this PR:

Test Summary:        | Pass  Total  Time
test_unbound_args.jl |    4      4  1.2s
Skipping PkgWithUndefinedExports.undefined_name
Skipping PkgWithUndefinedExports.undefined_name
Test Summary:             | Pass  Total  Time
test_undefined_exports.jl |    4      4  0.9s

Copy link
Member

@fingolfin fingolfin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the explanation and the PR

@fingolfin fingolfin merged commit f3be189 into JuliaTesting:master Jul 3, 2023
@lgoettgens lgoettgens deleted the lg/patch branch July 3, 2023 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants