Skip to content

Add conformance tests for is_unit & is_nilpotent#1947

Draft
fingolfin wants to merge 1 commit intomasterfrom
mh/conformance-test-is_unit-is_nilpotent
Draft

Add conformance tests for is_unit & is_nilpotent#1947
fingolfin wants to merge 1 commit intomasterfrom
mh/conformance-test-is_unit-is_nilpotent

Conversation

@fingolfin
Copy link
Copy Markdown
Member

Also improve is_nilpotent for matrices / matrix ring elements to work if the base ring is trivial.

Resolves #1941

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 22, 2024

Codecov Report

❌ Patch coverage is 90.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.17%. Comparing base (3e14b81) to head (8d86cbd).
⚠️ Report is 42 commits behind head on master.

Files with missing lines Patch % Lines
ext/TestExt/Rings-conformance-tests.jl 89.28% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1947   +/-   ##
=======================================
  Coverage   88.17%   88.17%           
=======================================
  Files         126      126           
  Lines       32073    32098   +25     
=======================================
+ Hits        28279    28302   +23     
- Misses       3794     3796    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fingolfin
Copy link
Copy Markdown
Member Author

Test fails:

  Expression: is_unit(a) == is_unit(a ^ 2)
  function is_unit is not implemented for argument
  PBWAlgQuoElem{QQFieldElem, Singular.n_Q}: 1//3*a^2*h^2*f^3*e^3 + 3//2*a^3*h^2*f^2*e^3 + 1//2*a^2*h^3*f*e^2

Perhaps someone (@JohnAAbbott ?) can look into adding that method next year.

In the meantime we could make the test conditional here and skip it if a not-implemented-exception is thrown...

@fingolfin
Copy link
Copy Markdown
Member Author

@fieker @thofma @lgoettgens just talking to @JohnAAbbott whether we can implement is_unit for PBWAlgQuoElem and, well, it is non-trivial.

So we probably should not insist on this being available. But what would be a good strategy to have such tests (they are useful, I found several bugs in our current code with them!) but allow some rings to opt-out of them because they don't implement a certain feature?

@fingolfin fingolfin force-pushed the mh/conformance-test-is_unit-is_nilpotent branch 2 times, most recently from bc85fed to ae49289 Compare January 31, 2025 19:01
Also improve is_nilpotent for matrices / matrix ring elements
to work if the base ring is trivial.
@fingolfin fingolfin force-pushed the mh/conformance-test-is_unit-is_nilpotent branch from ae49289 to 8d86cbd Compare February 4, 2026 00:27
@fingolfin fingolfin changed the title Add conformance tests for is_unit & is_nilpotent Add conformance tests for is_unit & is_nilpotent Feb 11, 2026
@fingolfin fingolfin added test This change adds or pertains to unit tests release notes: use title For PRs: the title of this PR is suitable for direct use in the release notes labels Feb 11, 2026
@fingolfin fingolfin marked this pull request as draft February 11, 2026 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release notes: use title For PRs: the title of this PR is suitable for direct use in the release notes test This change adds or pertains to unit tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add conformance tests for is_unit and is_nilpotent

1 participant