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

Revise some character table tests to use a doctest #2824

Merged

Conversation

fingolfin
Copy link
Member

These tests deal with testing how character tables are printed in various situations. We change this to (ab)use the jldoctest system from Documenter. This brings with it the advantage that it is very easy to adjust the tests for desired changes to the printing: it can be done changing

doctest(nothing, [AuxDocTest_GroupCharacters])

to

doctest(nothing, [AuxDocTest_GroupCharacters]; fix=true)

and then running this in the Julia REPL:

include("test/Groups/group_characters.jl")

This PR is motived by PR #2774 where it helps me to adjust the tests for the revised printing. But I think it's also of independent benefit.

Copy link
Member

@ThomasBreuer ThomasBreuer left a comment

Choose a reason for hiding this comment

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

O.k.

Thus the message is:
Whenever we have tests concerning the printed format of objects then we should use jldoctest instead of @testset & @test.

(I have another testfile that has to be revised in the same spirit.)

These tests deal with testing how character tables are printed
in various situations. We change this to (ab)use the `jldoctest`
system from Documenter. This brings with it the advantage that it
is very easy to adjust the tests for desired changes to the printing:
it can be done changing

    doctest(nothing, [AuxDocTest_GroupCharacters])

to

    doctest(nothing, [AuxDocTest_GroupCharacters]; fix=true)

and then running this in the Julia REPL:

    include("test/Groups/group_characters.jl")
@fingolfin fingolfin force-pushed the mh/doctest-for-character-tables branch from 78dbf63 to 492f8fe Compare September 19, 2023 14:09
@fingolfin
Copy link
Member Author

@ThomasBreuer exactly

@fingolfin fingolfin enabled auto-merge (squash) September 19, 2023 14:09
@fingolfin fingolfin merged commit 99f9cdb into oscar-system:master Sep 19, 2023
10 of 12 checks passed
@fingolfin fingolfin deleted the mh/doctest-for-character-tables branch September 19, 2023 20:15
@fingolfin
Copy link
Member Author

@ThomasBreuer wrote:

I have another testfile that has to be revised in the same spirit.

Which one is that? I am aware of test/Groups/MatrixDisplay.jl also in need of such changes, is that what you had in mind. If you plan to work on that this week, let me know, then I'll wait for it -- I'd rather not duplicate efforts.

@fingolfin fingolfin mentioned this pull request Sep 19, 2023
@ThomasBreuer
Copy link
Member

I have another testfile that has to be revised in the same spirit.

Which one is that?

experimental/OrthogonalDiscriminants/test/data.jl. I have made the changes already, and will create a pull request for that; at the same time, I will deal with test/Groups/MatrixDisplay.jl.

fieker pushed a commit that referenced this pull request Sep 29, 2023
These tests deal with testing how character tables are printed
in various situations. We change this to (ab)use the `jldoctest`
system from Documenter. This brings with it the advantage that it
is very easy to adjust the tests for desired changes to the printing:
it can be done changing

    doctest(nothing, [AuxDocTest_GroupCharacters])

to

    doctest(nothing, [AuxDocTest_GroupCharacters]; fix=true)

and then running this in the Julia REPL:

    include("test/Groups/group_characters.jl")
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.

None yet

3 participants