A community-maintained Python framework for creating mathematical animations.
fix test on windows
leotrse89a96d6de9e
diff --git a/manim/config/utils.py b/manim/config/utils.pyindex 40bf9eaeb..4f03815de 100644--- a/manim/config/utils.py+++ b/manim/config/utils.py@@ -75,6 +75,7 @@ def make_config_parser(custom_file=None):other_files = [user_wide, custom_file if custom_file else folder_wide]parser.read(other_files) # optional files+return parserdiff --git a/tests/test_config.py b/tests/test_config.pyindex fc598c628..adeda7f24 100644--- a/tests/test_config.py+++ b/tests/test_config.py@@ -63,22 +63,23 @@ def test_background_color():assert np.allclose(frame[0, 0], [255, 255, 255, 255])-def test_digest_file():+def test_digest_file(tmp_path):"""Test that a config file can be digested programatically."""assert config["media_dir"] == Path("media")assert config["video_dir"] == Path("media/videos")with tempconfig({}):- temp_cfg = tempfile.NamedTemporaryFile()- with open(temp_cfg.name, "w") as file:- file.write(- """- [CLI]- media_dir = this_is_my_favorite_path- video_dir = {media_dir}/videos- """- )- config.digest_file(temp_cfg.name)+ tmp_cfg = tempfile.NamedTemporaryFile("w", dir=tmp_path, delete=False)+ tmp_cfg.write(+ """+ [CLI]+ media_dir = this_is_my_favorite_path+ video_dir = {media_dir}/videos+ """+ )+ tmp_cfg.close()+ config.digest_file(tmp_cfg.name)+assert config["media_dir"] == Path("this_is_my_favorite_path")assert config["video_dir"] == Path("this_is_my_favorite_path/videos")