Skip to content

Fixed randomly failing test in bigraphical hyperplane function #39432

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

Merged
merged 3 commits into from
Feb 10, 2025

Conversation

Noel-Roemmele
Copy link
Contributor

@Noel-Roemmele Noel-Roemmele commented Feb 2, 2025

Fixes #39167. Fixed a doctest in the bigraphical function for hyperplanes that had a test failing every 1 in 1000 times. Made example have # random so it can fail and made a separate test in the test block that runs the original test 5 times.

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

⌛ Dependencies

…a test failing every 1 in 1000 times. Made

example have # random so it can fail and made a seperate test in the test block that runs the original test 5 times.
@DaveWitteMorris
Copy link
Member

Thanks for doing this. However, the comment "We try" is not helpful. You could simply delete it, but I think it would be better to say something informative and mention the issue number, such as "One of the above examples was marked "# random" because the output is not always the same. However, the answer is "65" more than 99.9% of the time, so we can make a doctest by running it repeatedly (see :issue:39167)::"

@DaveWitteMorris
Copy link
Member

Backticks are required around the issue number in the reference: it needs to be

:issue:`39167`

Sorry I didn't notice that the backticks didn't show up in my previous comment.

@DaveWitteMorris
Copy link
Member

Looks good. I will run make ptestlong. If that works and there are no other comments, I will set to positive review on Friday.

@DaveWitteMorris
Copy link
Member

make ptestlong had no errors that I would attribute to this PR, so I will set to positive review on Friday, unless there are other comments in the meantime.

vbraun pushed a commit to vbraun/sage that referenced this pull request Feb 9, 2025
sagemathgh-39432: Fixed randomly failing test in bigraphical hyperplane function
    
Fixes sagemath#39167. Fixed a doctest in the bigraphical function for
hyperplanes that had a test failing every 1 in 1000 times. Made example
have # random so it can fail and made a separate test in the test block
that runs the original test 5 times.
### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [X] The title is concise and informative.
- [X] The description explains in detail what this PR is about.
- [X] I have linked a relevant issue or discussion.
- [X] I have created tests covering the changes.
- [X] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies
    
URL: sagemath#39432
Reported by: Noel-Roemmele
Reviewer(s):
vbraun pushed a commit to vbraun/sage that referenced this pull request Feb 9, 2025
sagemathgh-39432: Fixed randomly failing test in bigraphical hyperplane function
    
Fixes sagemath#39167. Fixed a doctest in the bigraphical function for
hyperplanes that had a test failing every 1 in 1000 times. Made example
have # random so it can fail and made a separate test in the test block
that runs the original test 5 times.
### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [X] The title is concise and informative.
- [X] The description explains in detail what this PR is about.
- [X] I have linked a relevant issue or discussion.
- [X] I have created tests covering the changes.
- [X] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies
    
URL: sagemath#39432
Reported by: Noel-Roemmele
Reviewer(s):
@vbraun vbraun merged commit 25885e1 into sagemath:develop Feb 10, 2025
3 checks passed
@Noel-Roemmele Noel-Roemmele deleted the 39167HyperplaneRandomTest branch February 19, 2025 00:24
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.

Random test failure in src/sage/geometry/hyperplane_arrangement/library.py
3 participants