Example #1
0
def test_process_path_specs():
    inp = [
        pjoin(rootdir, 'foo', 'bar'),
        (pjoin(rootdir, 'foo', 'qux'), pjoin('baz', 'xyz'))
    ]
    outp = process_path_specs(inp)
    assert outp == [(pjoin(rootdir, 'foo', 'bar'), 'bar'),
                    (pjoin(rootdir, 'foo', 'qux'), pjoin('baz', 'xyz'))]
Example #2
0
def test_process_path_specs():
    inp = [
        pjoin(rootdir, "foo", "bar"),
        (pjoin(rootdir, "foo", "qux"), pjoin("baz", "xyz")),
    ]
    outp = process_path_specs(inp)
    assert outp == [
        (pjoin(rootdir, "foo", "bar"), "bar"),
        (pjoin(rootdir, "foo", "qux"), pjoin("baz", "xyz")),
    ]
Example #3
0
def test_process_path_specs_bad():
    with assert_raises(ConfigError):
        process_path_specs([(pjoin(rootdir, "foo"), pjoin(rootdir, "bar"))])

    with assert_raises(ConfigError):
        process_path_specs([("a", "b", "c")])
Example #4
0
def test_process_path_specs_bad():
    with assert_raises(ConfigError):
        process_path_specs([(pjoin(rootdir, 'foo'), pjoin(rootdir, 'bar'))])

    with assert_raises(ConfigError):
        process_path_specs([('a', 'b', 'c')])
Example #5
0
def test_process_path_specs():
    inp = [pjoin(rootdir, 'foo', 'bar'),
           (pjoin(rootdir, 'foo', 'qux'), pjoin('baz', 'xyz'))]
    outp = process_path_specs(inp)
    assert outp == [(pjoin(rootdir, 'foo', 'bar'), 'bar'),
                    (pjoin(rootdir, 'foo', 'qux'), pjoin('baz', 'xyz'))]
Example #6
0
def test_process_path_specs_bad():
    with assert_raises(ConfigError):
        process_path_specs([(pjoin(rootdir, 'foo'), pjoin(rootdir, 'bar'))])
    
    with assert_raises(ConfigError):
        process_path_specs([('a', 'b', 'c')])