code: def test_train_test_split_reader():
      """Test train_test_split method of Reader class."""
      reader = Reader(sep=",")
      with pytest.raises(ValueError):
          reader.train_test_split(Lpath=None, target_name="target")
      with pytest.raises(ValueError):
          reader.train_test_split(
              Lpath=["data_for_tests/train.csv"], target_name=None
          )
      with pytest.raises(ValueError):
          reader = Reader(to_path=None)
          reader.train_test_split(
              Lpath=["data_for_tests/train.csv"], target_name="Survived"
          )
      reader = Reader(sep=",")
      dict = reader.train_test_split(
          Lpath=["data_for_tests/train.csv"], target_name="Survived"
      )
      assert len(dict) == 3
      assert "train" in list(dict.keys())
      assert "test" in list(dict.keys())
      assert "target" in list(dict.keys())
      assert np.all(dict["train"].columns == dict["train"].columns)
      if sys.version_info[0] >= 3 and sys.platform != "win32":
          reader = Reader(to_hdf5=True)
          dict = reader.train_test_split(
              Lpath=["data_for_tests/train.h5"], target_name="Survived"
          )
          assert len(dict) == 3
          assert "train" in list(dict.keys())
          assert "test" in list(dict.keys())
          assert "target" in list(dict.keys())
          assert np.all(dict["train"].columns == dict["train"].columns)
  
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 3 for calling a global function with example usage: test_train_test_split_reader() without return types