docstr: When explicitly setting a config file, paths should be relative to the
  config file, not the working directory.
docstr_tok: ["When","explicitly","setting","a","config","file",",","paths","should","be","relative","to","the","config","file",",","not","the","working","directory","."]
code: def test_load_from_file_with_relative_paths(self, config_dir):
      """
      When explicitly setting a config file, paths should be relative to the
      config file, not the working directory.
      """
      config_fname = os.path.join(config_dir, "mkdocs.yml")
      with open(config_fname, "w") as config_file:
          config_file.write("docs_dir: src\nsite_name: MkDocs Test\n")
      docs_dir = os.path.join(config_dir, "src")
      os.mkdir(docs_dir)
  
      cfg = base.load_config(config_file=config_file)
      self.assertTrue(isinstance(cfg, defaults.MkDocsConfig))
      self.assertEqual(cfg.site_name, "MkDocs Test")
      self.assertEqual(cfg.docs_dir, docs_dir)
      self.assertEqual(cfg.config_file_path, config_fname)
      self.assertIsInstance(cfg.config_file_path, str)
  
imports: import os
  import unittest
  from mkdocs import exceptions
  from mkdocs.config import base
  from mkdocs.config import config_options
  from mkdocs.config import defaults
  from mkdocs.config.base import ValidationError
  from mkdocs.tests.base import change_dir, tempdir
label_desc: Use image node_id 17 for calling the ConfigBaseTests obj's underlying member method code with example usage: obj.test_load_from_file_with_relative_paths(config_dir) without return types