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

Fix PrettyPrinting corner case, add more tests #1415

Merged
merged 1 commit into from
Sep 5, 2023

Conversation

fingolfin
Copy link
Member

@fingolfin fingolfin commented Sep 5, 2023

Add some examples from the OSCAR dev docs to make sure they match reality.

Also fix a bug where in some situations the pretty printing feature caused a trailing 0 to be printed (e.g. when ending printing with a Dedent()), as in this example:

julia> show(stdout, MIME"text/plain"(), F)
Number field with defining polynomial x^2 + 3
  over rational field0

I tried to add a test case for this, but the issue only happens with stdout, not with an IOBuffer

@codecov
Copy link

codecov bot commented Sep 5, 2023

Codecov Report

Merging #1415 (fbf4194) into master (6299c95) will increase coverage by 0.04%.
Report is 1 commits behind head on master.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1415      +/-   ##
==========================================
+ Coverage   85.74%   85.79%   +0.04%     
==========================================
  Files         107      107              
  Lines       28771    28771              
==========================================
+ Hits        24670    24683      +13     
+ Misses       4101     4088      -13     
Files Changed Coverage Δ
src/PrettyPrinting.jl 92.64% <100.00%> (ø)

... and 6 files with indirect coverage changes

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

Add some examples from the OSCAR dev docs to make sure they match
reality.

Also fix a bug where in some situations the pretty printing feature
caused a trailing 0 to be printed (e.g. when ending printing with
a `Dedent()`), as in this example:

    julia> show(stdout, MIME"text/plain"(), F)
    Number field with defining polynomial x^2 + 3
      over rational field0

I tried to add a test case for this, but the issue only happens
with `stdout`, not with an `IOBuffer`
@fingolfin fingolfin enabled auto-merge (squash) September 5, 2023 15:04
@fingolfin fingolfin merged commit 58c0b47 into Nemocas:master Sep 5, 2023
14 of 15 checks passed
@fingolfin fingolfin deleted the mh/fix-printing branch September 5, 2023 15:52
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