class_docstr: Unit tests using pathlib.Path for file interaction.
class_docstr_tok: ["Unit","tests","using","pathlib.Path","for","file","interaction","."]
docstr: Initialization from the data path.
docstr_tok: ["Initialization","from","the","data","path","."]
code: def test_DMatrix_init_from_path(self):
      """Initialization from the data path."""
      dtrain, _ = tm.load_agaricus(__file__)
      assert dtrain.num_row() == 6513
      assert dtrain.num_col() == 127
  
imports: import json
  import os
  import pathlib
  import tempfile
  from pathlib import Path
  import numpy
  import pytest
  import xgboost
  from xgboost import testing
label_desc: Use image node_id 1 for calling the TestBasicPathLike obj's underlying member method code with example usage: obj.test_DMatrix_init_from_path() without return types