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)

        When explicitly setting a config file, paths should be relative to the
        config file, not the working directory.
        
mkdocs/tests/config/base_tests.py