class_docstr: Test for _WindowBuffer
class_docstr_tok: ["Test","for","_WindowBuffer"]
docstr: size > step
  
  Inputs:
  
    ----1-2-3-4-5-6-7-8-9--->
  
  size: 3
  step: 2
  
  outputs:
    ----[1, 2, 3] - [3, 4, 5] - [5, 6, 7] - [7, 8, 9] - [9] ---->
docstr_tok: ["size",">","step","Inputs",":","--","--","1-2-3-4-5-6-7-8-9","--","-",">","size",":","3","step",":","2","outputs",":","--","--","[","1",",","2",",","3","]","-","[","3",",","4",",","5","]","-","[","5",",","6",",","7","]","-","[","7",",","8",",","9","]","-","[","9","]","--","--",">"]
code: def test_sliding_small(self):
      """
      size > step
  
      Inputs:
  
        ----1-2-3-4-5-6-7-8-9--->
  
      size: 3
      step: 2
  
      outputs:
        ----[1, 2, 3] - [3, 4, 5] - [5, 6, 7] - [7, 8, 9] - [9] ---->
      """
      ret = [[1, 2, 3], [3, 4, 5], [5, 6, 7], [7, 8, 9], [9]]
      index = 0
      buf = _WindowBuffer(3, 2)
      for i in range(1, 10):
          if buf(i, i - 1):
              self.assertEqual(buf.data, ret[index])
              index += 1
              buf = buf.next()
  
      while buf is not None:
          if buf.data:
              self.assertEqual(buf.data, ret[index])
              index += 1
          buf = buf.next()
  
imports: import unittest
  import time
  import copy
  import uuid
  from concurrent.futures import ThreadPoolExecutor
  from towhee.runtime.node_repr import NodeRepr
  from towhee.runtime.nodes import create_node, NodeStatus
  from towhee.runtime.nodes._window import _WindowBuffer
  from towhee.runtime.data_queue import DataQueue, ColumnType, Empty
  from towhee.runtime.operator_manager import OperatorPool
label_desc: Use image node_id 2 for calling the TestWindowBuffer obj's underlying member method code with example usage: obj.test_sliding_small() without return types