Skip to content

Conversation

JohnAAbbott
Copy link
Collaborator

Copy link

codecov bot commented Oct 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.95%. Comparing base (2980528) to head (7f40048).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2188   +/-   ##
=======================================
  Coverage   87.95%   87.95%           
=======================================
  Files         127      127           
  Lines       31791    31793    +2     
=======================================
+ Hits        27961    27963    +2     
  Misses       3830     3830           

☔ 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.

@simonbrandhorst
Copy link
Contributor

Thanks a lot. Looks good to me. Can we merge?

@JohnAAbbott
Copy link
Collaborator Author

Quick question: the proposed implementation always gives an error except if a factorization is tested for equality against itself (in which case it returns true). Is this the behaviour that we want?

@thofma
Copy link
Member

thofma commented Oct 20, 2025

I would just make it error in all cases with the same error message.

@simonbrandhorst
Copy link
Contributor

It is certainly an improvement over the existing state of things.
I can also live with always returning an error (no exception) ... but I don't think it matters. So let us get over with this.

@JohnAAbbott
Copy link
Collaborator Author

I hope to push some tests very soon....

@JohnAAbbott
Copy link
Collaborator Author

I would just make error in all cases with the same error message.

This is probably simplest until we find a better idea inspired by a genuine use-case. It does still "feel strange" that comparing a factorization with itself triggers an error (rather than returning true), but triggering an error even in this case does emphasize that factorizations cannot be equality-tested.

I suppose I had better just delete the more involved code I first pushed -- extra complexity for no purpose?

@thofma
Copy link
Member

thofma commented Oct 20, 2025

This is probably simplest until we find a better idea inspired by a genuine use-case. It does still "feel strange" that comparing a factorization with itself triggers an error (rather than returning true), but triggering an error even in this case does emphasize that factorizations cannot be equality-tested.

The problem with just testing F1 === F2 is that for F = factor(5) one has F == F evaluate to true but factor(5) == factor(5) evaluates to false. I would not consider this an advantage over just always throwing an error.

I suppose I had better just delete the more involved code I first pushed -- extra complexity for no purpose?

Yes, maybe best to just delete it.

@JohnAAbbott JohnAAbbott marked this pull request as ready for review October 20, 2025 17: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.

3 participants