class_docstr: Tests `strided_moving_window` function defined in `darts.utils.data.tabularization`.
docstr: Checks that appropriate error is thrown when `stride` is set to
  a non-positive number and/or a non-`int` value.
docstr_tok: ["Checks","that","appropriate","error","is","thrown","when","`","stride","`","is","set","to","a","non-positive","number","and\/or","a","non-","`","int","`","value","."]
code: def test_strided_moving_window_invalid_stride_error(self):
      """
      Checks that appropriate error is thrown when `stride` is set to
      a non-positive number and/or a non-`int` value.
      """
      x = np.arange(1)
      # `stride` isn't positive:
      with pytest.raises(ValueError) as err:
          strided_moving_window(x, window_len=1, stride=0)
      assert ("`stride` must be a positive `int`.") == str(err.value)
      # `stride` is `float`, not `int`:
      with pytest.raises(ValueError) as err:
          strided_moving_window(x, window_len=1, stride=1.1)
      assert ("`stride` must be a positive `int`.") == str(err.value)
  
file_path: darts/darts/tests/utils/tabularization/test_strided_moving_window.py
imports: from itertools import product
  import numpy
  import pytest
  from darts.utils.data.tabularization import strided_moving_window
label_desc: Use image node_id 2 for calling the TestStridedMovingWindow obj's underlying member method code with example usage: obj.test_strided_moving_window_invalid_stride_error() without return types