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

Add a new TestCase that asserts that examples exit successfully. #910

Merged
merged 1 commit into from
Feb 22, 2025

Conversation

fischman
Copy link
Contributor

@fischman fischman commented Feb 22, 2025

Fixes #909.

Examples changes that were necessary:

  • loft.py: failed on macos (only) because of (seemingly) over-precise
    floating-point accuracy assertion. Loosened the tolerance, and
    expressed it as a multiple of the expected value.

    AssertionError: delta=0.002982314711971412 is greater than tolerance=0.001; got=1306.3375467197516, want=1306.3405290344635

  • packed_boxes.py: only emit output files when GEN_DOCS is
    True (mimicking lego.py).

@fischman fischman marked this pull request as draft February 22, 2025 07:45
@fischman
Copy link
Contributor Author

@gumyr interested in any feedback you may have on this approach.
Hopefully CI will finish in a few minutes and provide an official take on what's failing and how long the tests take, but in case it's interesting this is what I got on my laptop: gist.

gumyr added a commit that referenced this pull request Feb 22, 2025
Copy link

codecov bot commented Feb 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.91%. Comparing base (8e4aa33) to head (80097a9).
Report is 4 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #910      +/-   ##
==========================================
+ Coverage   96.73%   96.91%   +0.18%     
==========================================
  Files          32       32              
  Lines        9434     9434              
==========================================
+ Hits         9126     9143      +17     
+ Misses        308      291      -17     

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

Examples changes that were necessary:
- loft.py: failed on macos (only) because of (seemingly) over-precise
  floating-point accuracy assertion. Loosened the tolerance, and
  expressed it as a multiple of the expected value.
  > AssertionError: delta=0.002982314711971412 is greater than tolerance=0.001; got=1306.3375467197516, want=1306.3405290344635
- packed_boxes.py: only emit output files when GEN_DOCS is
  True (mimicking lego.py).
@fischman fischman marked this pull request as ready for review February 22, 2025 18:22
@gumyr gumyr merged commit 8aeee30 into gumyr:dev Feb 22, 2025
20 checks passed
@gumyr
Copy link
Owner

gumyr commented Feb 22, 2025

Thank you! The examples won't be forgotten now.

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.

Examples should be kept working by being run in a test
2 participants