Skip to content

tests: remove working cpydiff for float rounding#17802

Merged
dpgeorge merged 2 commits into
micropython:masterfrom
dpgeorge:tests-remove-working-cpydiff-float-rounding
Aug 1, 2025
Merged

tests: remove working cpydiff for float rounding#17802
dpgeorge merged 2 commits into
micropython:masterfrom
dpgeorge:tests-remove-working-cpydiff-float-rounding

Conversation

@dpgeorge
Copy link
Copy Markdown
Member

@dpgeorge dpgeorge commented Aug 1, 2025

Summary

In #17444 float formatting was improved, which made tests/cpydiff/types_float_rounding.py now behave the same in MicroPython as in CPython.

But the CI did not pick this up. So tweak the workflow and delete that cpydiff test.

Testing

To be tested by CI.

@dpgeorge dpgeorge added docs tests Relates to tests/ directory in source labels Aug 1, 2025
@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.38%. Comparing base (dbbaa95) to head (947d544).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #17802   +/-   ##
=======================================
  Coverage   98.38%   98.38%           
=======================================
  Files         171      171           
  Lines       22276    22276           
=======================================
  Hits        21917    21917           
  Misses        359      359           

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Aug 1, 2025

Code size report:

   bare-arm:    +0 +0.000% 
minimal x86:    +0 +0.000% 
   unix x64:    +0 +0.000% standard
      stm32:    +0 +0.000% PYBV10
     mimxrt:    +0 +0.000% TEENSY40
        rp2:    +0 +0.000% RPI_PICO_W
       samd:    +0 +0.000% ADAFRUIT_ITSYBITSY_M4_EXPRESS
  qemu rv32:    +0 +0.000% VIRT_RV32

The unix port is needed to build the docs, due to the cpydiff tests which
run both CPython and MicroPython (unix port).  That was previously not
failing the CI because the output from MicroPython was:

    /bin/sh: 1: ../ports/unix/build-standard/micropython: not found

which doesn't match the CPython output for any of the cpydiff tests, and so
it was considered a "pass" in terms of the output differing.

Also, run the docs workflow when py/ or tests/cpydiff/ changes, because the
cpydiff results may change when the core code changes.

Signed-off-by: Damien George <[email protected]>
@dpgeorge dpgeorge force-pushed the tests-remove-working-cpydiff-float-rounding branch from 6b0f6f4 to 30430a6 Compare August 1, 2025 01:07
@dpgeorge
Copy link
Copy Markdown
Member Author

dpgeorge commented Aug 1, 2025

OK, docs build now fails CI properly with:

Failing due to non-differences in results. If MicroPython behaviour has changed to match CPython, please remove the file(s) mentioned above.
Error: Test has same output in CPython vs MicroPython: ../tests/cpydiff/types_float_rounding.py

Since commit dbbaa95, this test now
produces the same output on MicroPython as CPython does, namely -1e+01.

Signed-off-by: Damien George <[email protected]>
@dpgeorge dpgeorge force-pushed the tests-remove-working-cpydiff-float-rounding branch from 30430a6 to 947d544 Compare August 1, 2025 01:14
@dpgeorge dpgeorge linked an issue Aug 1, 2025 that may be closed by this pull request
@dpgeorge dpgeorge merged commit 947d544 into micropython:master Aug 1, 2025
71 of 72 checks passed
@dpgeorge dpgeorge deleted the tests-remove-working-cpydiff-float-rounding branch August 1, 2025 01:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs tests Relates to tests/ directory in source

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: docs.micropython.org is down

1 participant