docstr: 测试两个dataset能否正确concat
docstr_tok: ["\u6d4b\u8bd5\u4e24\u4e2adataset\u80fd\u5426\u6b63\u786econcat"]
code: def test_concat(self):
      """
      测试两个dataset能否正确concat
  
      """
      ds1 = DataSet(
          {
              "x": [[1, 2, 3, 4] for _ in range(10)],
              "y": [[5, 6] for _ in range(10)],
          }
      )
      ds2 = DataSet(
          {
              "x": [[4, 3, 2, 1] for _ in range(10)],
              "y": [[6, 5] for _ in range(10)],
          }
      )
      ds3 = ds1.concat(ds2)
  
      assert len(ds3) == 20
  
      assert ds1[9]["x"] == [1, 2, 3, 4]
      assert ds1[10]["x"] == [4, 3, 2, 1]
  
      ds2[0]["x"][0] = 100
      assert ds3[10]["x"][0] == 4  # 不改变copy后的field了
  
      ds3[10]["x"][0] = -100
      assert ds2[0]["x"][0] == 100  # 不改变copy前的field了
  
      # 测试inplace
      ds1 = DataSet(
          {
              "x": [[1, 2, 3, 4] for i in range(10)],
              "y": [[5, 6] for i in range(10)],
          }
      )
      ds2 = DataSet(
          {
              "x": [[4, 3, 2, 1] for i in range(10)],
              "y": [[6, 5] for i in range(10)],
          }
      )
      ds3 = ds1.concat(ds2, inplace=True)
  
      ds2[0]["x"][0] = 100
      assert ds3[10]["x"][0] == 4  # 不改变copy后的field了
  
      ds3[10]["x"][0] = -100
      assert ds2[0]["x"][0] == 100  # 不改变copy前的field了
  
      ds3[0]["x"][0] = 100
      assert ds1[0]["x"][0] == 100  # 改变copy前的field了
  
      # 测试mapping
      ds1 = DataSet(
          {
              "x": [[1, 2, 3, 4] for i in range(10)],
              "y": [[5, 6] for i in range(10)],
          }
      )
      ds2 = DataSet(
          {
              "X": [[4, 3, 2, 1] for i in range(10)],
              "Y": [[6, 5] for i in range(10)],
          }
      )
      ds3 = ds1.concat(ds2, field_mapping={"X": "x", "Y": "y"})
      assert len(ds3) == 20
  
      # 测试忽略掉多余的
      ds1 = DataSet(
          {
              "x": [[1, 2, 3, 4] for i in range(10)],
              "y": [[5, 6] for i in range(10)],
          }
      )
      ds2 = DataSet(
          {
              "X": [[4, 3, 2, 1] for i in range(10)],
              "Y": [[6, 5] for i in range(10)],
              "Z": [0] * 10,
          }
      )
      ds3 = ds1.concat(ds2, field_mapping={"X": "x", "Y": "y"})
  
      # 测试报错
      ds1 = DataSet(
          {
              "x": [[1, 2, 3, 4] for i in range(10)],
              "y": [[5, 6] for i in range(10)],
          }
      )
      ds2 = DataSet({"X": [[4, 3, 2, 1] for i in range(10)]})
      with pytest.raises(RuntimeError):
          ds3 = ds1.concat(ds2, field_mapping={"X": "x"})
  
imports: import os
  import pytest
  import numpy
  from fastNLP.core.dataset import DataSet, FieldArray, Instance, ApplyResultException
  from fastNLP import logger
label_desc: Use image node_id 26 for calling the TestDataSetMethods obj's underlying member method code with example usage: obj.test_concat() without return types