def test_load_from_closed_file(self, temp_dir):
        """
        The `serve` command with auto-reload may pass in a closed file descriptor.
        Ensure `load_config` reloads the closed file.
        """
        with open(os.path.join(temp_dir, 'mkdocs.yml'), 'w') as config_file:
            config_file.write("site_name: MkDocs Test\n")
        os.mkdir(os.path.join(temp_dir, 'docs'))

        cfg = base.load_config(config_file=config_file)
        self.assertTrue(isinstance(cfg, defaults.MkDocsConfig))
        self.assertEqual(cfg.site_name, 'MkDocs Test')

        The `serve` command with auto-reload may pass in a closed file descriptor.
        Ensure `load_config` reloads the closed file.
        
mkdocs/tests/config/base_tests.py