def test_invalid_toml_file(self, tmp_path: Path) -> None:
        """Invalid .toml files should raise `UsageError`."""
        fn = tmp_path / "myconfig.toml"
        fn.write_text("]invalid toml[", encoding="utf-8")
        with pytest.raises(UsageError):
            load_config_dict_from_file(fn)
Invalid .toml files should raise `UsageError`.
testing/test_findpaths.py