class_docstr: Unit tests using pathlib.Path for file interaction.
class_docstr_tok: ["Unit","tests","using","pathlib.Path","for","file","interaction","."]
docstr: An invalid model_file path should raise XGBoostError.
docstr_tok: ["An","invalid","model_file","path","should","raise","XGBoostError","."]
code: def test_Booster_init_invalid_path(self):
      """An invalid model_file path should raise XGBoostError."""
      with pytest.raises(xgb.core.XGBoostError):
          xgb.Booster(model_file=Path("invalidpath"))
  
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 3 for calling the TestBasicPathLike obj's underlying member method code with example usage: obj.test_Booster_init_invalid_path() without return types