def test_create_ns_weird_no_close():
    # a namespace that opens but doesn't close
    assert ('/a/b/++c' ==
            create_path([
                (DEFAULT, 'a'),
                (DEFAULT, 'b'),
                (DEFAULT, '++c')]))
def test_create_ns_weird_no_open():
    # a namespace that closes but doesn't open
    assert ('/a/b/view++c' ==
            create_path([
                (DEFAULT, 'a'),
                (DEFAULT, 'b'),
                (DEFAULT, 'view++c')]))
def test_create_ns_shortcut_not_at_beginning():
    assert ('/a/b/a@@c' ==
            create_path([
                (DEFAULT, 'a'),
                (DEFAULT, 'b'),
                (DEFAULT, 'a@@c')], shortcuts={'@@': VIEW}))
def test_create_ns_shortcut():
    assert ('/a/b/@@c' ==
            create_path([
                (DEFAULT, 'a'),
                (DEFAULT, 'b'),
                (VIEW, 'c')], shortcuts={'@@': VIEW}))
def test_create_ns():
    assert ('/a/b/++view++c' ==
            create_path([
                (DEFAULT, 'a'),
                (DEFAULT, 'b'),
                (VIEW, 'c')]))
def test_create():
    assert ('/a/b/c' ==
            create_path([
                (DEFAULT, 'a'),
                (DEFAULT, 'b'),
                (DEFAULT, 'c')]))