Method: Polars::Testing#assert_series_equal
- Defined in:
- lib/polars/testing.rb
#assert_series_equal(left, right, check_dtype: true, check_names: true, check_order: true, check_exact: false, rtol: 1e-5, atol: 1e-8, categorical_as_str: false) ⇒ nil
Assert that the left and right Series are equal.
Raises a detailed AssertionError if the Series differ.
This function is intended for use in unit tests.
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 |
# File 'lib/polars/testing.rb', line 148 def assert_series_equal( left, right, check_dtype: true, check_names: true, check_order: true, check_exact: false, rtol: 1e-5, atol: 1e-8, categorical_as_str: false ) if !(left.is_a?(Series) && right.is_a?(Series)) raise_assertion_error( "inputs", "unexpected input types", left.class.name, right.class.name ) end Plr.assert_series_equal_rb( left._s, right._s, check_dtype, check_names, check_order, check_exact, rtol, atol, categorical_as_str ) end |