from repo_cloner.lib.config_file_not_found_error import ConfigFileNotFoundError from pathlib import PosixPath def test_type(): x = ConfigFileNotFoundError() assert isinstance(x, ConfigFileNotFoundError) def test_return(): x = ConfigFileNotFoundError("/tmp", "cloner.cfg") s = x.__str__() assert s == "Config file does not exist: /tmp/cloner.cfg" def test_str_single_arg(): x = ConfigFileNotFoundError("/tmp") s = x.__str__() assert s == "ConfigFileNotFoundError('/tmp')" def test_return_empty(): x = ConfigFileNotFoundError() s = x.__str__() assert s == "ConfigFileNotFoundError()" def test_posix_path(): d = PosixPath("/nonexistent") x = ConfigFileNotFoundError(d, "config.cfg") assert x.__str__() == "Config file does not exist: /nonexistent/config.cfg"