Skip to content

Conversation

@Kevin-Patyk
Copy link
Contributor

Relates to #23448.

First implementation of using proptest to test core functionality. Tests were run with:

cargo test --all-features -p polars-core test_scalar_cast

Nested types were not included (yet), only simple types. 2 bugs were found, out-of-range date time values causing a panic and casting between Binary and BinaryOffset. These have been made into issues.

The rest of the tests pass:

   Compiling polars-core v0.52.0 (/home/kevincp560/Projects/polars/crates/polars-core)
    Finished `test` profile [unoptimized + debuginfo] target(s) in 15.52s
     Running unittests src/lib.rs (/home/kevincp560/Projects/polars/target/debug/deps/polars_core-385d13635ce3c12b)

running 2 tests
test scalar::tests::test_scalar_cast_identity ... ok
test scalar::tests::test_scalar_cast_with_options ... ok

test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 162 filtered out; finished in 0.01s

Number of proptest cases was put at 100, but can easily be increased/decreased.

@github-actions github-actions bot added internal An internal refactor or improvement rust Related to Rust Polars labels Dec 11, 2025
@codecov
Copy link

codecov bot commented Dec 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.72%. Comparing base (f91c3a8) to head (9402186).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #25744      +/-   ##
==========================================
+ Coverage   80.61%   80.72%   +0.10%     
==========================================
  Files        1763     1763              
  Lines      242867   242912      +45     
  Branches     3043     3043              
==========================================
+ Hits       195797   196087     +290     
+ Misses      46289    46044     -245     
  Partials      781      781              

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal An internal refactor or improvement rust Related to Rust Polars

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant