Files
gitignore-generator/tests/test_config.py
7000pctAUTO 01cec11854
Some checks failed
CI / test (3.10) (push) Has been cancelled
CI / test (3.11) (push) Has been cancelled
CI / test (3.12) (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / build (push) Has been cancelled
fix: update test imports to use gitignore_generator module instead of src
2026-02-02 16:23:35 +00:00

32 lines
848 B
Python

import tempfile
from pathlib import Path
import pytest
from gitignore_generator.config import Config
class TestConfig:
def test_init_defaults(self):
config = Config()
assert config.custom_templates_dir.exists() or True
def test_default_output(self):
config = Config()
assert config.default_output == ".gitignore"
def test_template_dir(self):
config = Config()
assert (config.template_dir / "templates.json").exists()
def test_get_template_path(self):
config = Config()
path = config.get_template_path("python", "languages")
assert path is not None
assert path.exists()
def test_get_template_path_nonexistent(self):
config = Config()
path = config.get_template_path("nonexistent123", "languages")
assert path is None