code: def test_clean_reader():
      """Test clean method of Reader class."""
      reader = Reader()
      with pytest.raises(ValueError):
          reader.clean(path=None, drop_duplicate=False)
      with pytest.raises(ValueError):
          reader.clean(path="data_for_tests/train.csv")
      reader = Reader(sep=",")
      df = reader.clean(path="data_for_tests/train.csv")
      assert np.shape(df) == (891, 12)
      with pytest.raises(ValueError):
          reader.clean(path="data_for_tests/train.wrong_extension")
      df_drop = reader.clean(
          path="data_for_tests/train.csv", drop_duplicate=True
      )
      assert np.shape(df_drop) == (891, 12)
      assert np.all(df["Name"] == df_drop["Name"])
      reader = Reader()
      df_excel = reader.clean(path="data_for_tests/train.xls")
      assert np.shape(df_excel) == (891, 12)
      assert np.all(df["Name"] == df_excel["Name"])
      if (
          sys.platform == "win32"
          and sys.version_info[0] <= 3
          and sys.version_info[1] <= 5
      ):
          pass
      else:
          if sys.version_info[0] >= 3:
              df_hdf = reader.clean(path="data_for_tests/train.h5")
              assert np.shape(df_hdf) == (891, 12)
              assert np.all(df["Name"] == df_hdf["Name"])
          df_json = reader.clean(path="data_for_tests/train.json")
          assert np.shape(df_json) == (891, 12)
  
file_path: MLBox/tests/test_reader.py
imports: import sys
  import pytest
  import pandas
  import numpy
  from mlbox.preprocessing.reader import convert_list
  from mlbox.preprocessing.reader import convert_float_and_dates
  from mlbox.preprocessing.reader import Reader
label_desc: Use image node_id 2 for calling a global function with example usage: test_clean_reader() without return types