# Path: boussole/exceptions.py
# class SettingsInvalidError(BoussoleBaseException):
#     """
#     Exception to be raised when a settings is detected as invalid.
#     """
#     pass


import os
import json
import yaml
import pytest
from boussole.exceptions import SettingsInvalidError

    assert os.path.exists(os.path.join(basedir, settings_filename))
    assert os.path.exists(os.path.join(basedir, "scss"))
    assert os.path.exists(os.path.join(basedir, "css"))

    with open(os.path.join(basedir, settings_filename), "r") as fp:
        assert module.load(fp, **module_opts) == {
            'SOURCES_PATH': 'scss',
            'TARGET_PATH': 'css',
            "LIBRARY_PATHS": [],
            "OUTPUT_STYLES": "nested",
            "SOURCE_COMMENTS": False,
            "EXCLUDES": []
        }


@pytest.mark.parametrize("name,ext,module", [
    ('json', 'json', json),
    ('yaml', 'yml', yaml),
])
def test_error(projectstarter, temp_builds_dir, name, ext, module):
    """
    Raised exception caused by duplicate paths
    """
    tmp_dirname = 'projectstarter_init_error_{}'.format(name)
    settings_filename = "settings.{}".format(ext)

    basedir = temp_builds_dir.join(tmp_dirname).strpath
    os.makedirs(basedir)


# Path: boussole/exceptions.py
# class SettingsInvalidError(BoussoleBaseException):
#     """
#     Exception to be raised when a settings is detected as invalid.
#     """
#     pass


# Path: tests/102_projectstarter/004_init.py
import os
import json
import yaml
import pytest
from boussole.exceptions import SettingsInvalidError


    assert os.path.exists(os.path.join(basedir, settings_filename))
    assert os.path.exists(os.path.join(basedir, "scss"))
    assert os.path.exists(os.path.join(basedir, "css"))

    with open(os.path.join(basedir, settings_filename), "r") as fp:
        assert module.load(fp, **module_opts) == {
            'SOURCES_PATH': 'scss',
            'TARGET_PATH': 'css',
            "LIBRARY_PATHS": [],
            "OUTPUT_STYLES": "nested",
            "SOURCE_COMMENTS": False,
            "EXCLUDES": []
        }


@pytest.mark.parametrize("name,ext,module", [
    ('json', 'json', json),
    ('yaml', 'yml', yaml),
])
def test_error(projectstarter, temp_builds_dir, name, ext, module):
    """
    Raised exception caused by duplicate paths
    """
    tmp_dirname = 'projectstarter_init_error_{}'.format(name)
    settings_filename = "settings.{}".format(ext)

    basedir = temp_builds_dir.join(tmp_dirname).strpath
    os.makedirs(basedir)


    with pytest.raises(SettingsInvalidError):