macro_rules! assert_series_equal {
($left:expr, $right:expr $(, $options:expr)?) => { ... };
}Expand description
Asserts that two series are equal according to the specified options.
This macro compares two Polars Series objects and panics with a detailed error message if they are not equal. It provides two forms:
- With custom comparison options
- With default comparison options
§Example
use polars_core::prelude::*;
use polars_testing::assert_series_equal;
use polars_testing::asserts::SeriesEqualOptions;
// Create two series to compare
let s1 = Series::new("a".into(), &[1, 2, 3]);
let s2 = Series::new("a".into(), &[1, 2, 3]);
// Assert with default options
assert_series_equal!(&s1, &s2);
// Assert with custom options
let options = SeriesEqualOptions::default()
.with_check_exact(true)
.with_check_dtypes(false);
assert_series_equal!(&s1, &s2, options);§Panics
Panics when the series are not equal according to the specified comparison criteria.