def test_config_directory():
    test = soc.ConfigDirectory('foo.bar')
    result = test()

    # Can't really predict the output, as it's environment-dependent.
    # Just make sure we have something that looks like a path to our file.
    assert result.startswith('/')
    assert result.endswith('foo.bar')
Exemplo n.º 2
0
def build_default_sources():
    sources = [
        build_command_line_source(),
        soc.EnvironmentVariableSource(),
        soc.ConfigFileSource((
            '.prospectorrc',
            'setup.cfg',
            'tox.ini',
        )),
        soc.ConfigFileSource((
            soc.ConfigDirectory('.prospectorrc'),
            soc.HomeDirectory('.prospectorrc'),
        ))
    ]

    return sources
Exemplo n.º 3
0
def build_default_sources():
    sources = [
        build_command_line_source(),
        soc.EnvironmentVariableSource(),
        soc.ConfigFileSource((
            ".prospectorrc",
            "setup.cfg",
            "tox.ini",
        )),
        soc.ConfigFileSource((
            soc.ConfigDirectory(".prospectorrc"),
            soc.HomeDirectory(".prospectorrc"),
        )),
    ]

    return sources