示例#1
0
def test_splitglob():
    assert splitglob('~/Downloads') == (Path.home() / 'Downloads', '')
    assert (splitglob(r'/Test/\* tmp\*/*[!H]/**/*.*') == (
        Path(r'/Test/\* tmp\*'), '*[!H]/**/*.*'))
    assert (splitglob('~/Downloads/Program 0.1*.exe') == (Path.home() /
                                                          'Downloads',
                                                          'Program 0.1*.exe'))
    assert (splitglob('~/Downloads/Program[ms].exe') == (Path.home() /
                                                         'Downloads',
                                                         'Program[ms].exe'))
    assert (splitglob('~/Downloads/Program.exe') == (Path.home() /
                                                     'Downloads' /
                                                     'Program.exe', ''))
示例#2
0
def test_splitglob():
    assert splitglob("~/Downloads") == (Path.home() / "Downloads", "")
    assert splitglob(r"/Test/\* tmp\*/*[!H]/**/*.*") == (
        Path(r"/Test/\* tmp\*"),
        "*[!H]/**/*.*",
    )
    assert splitglob("~/Downloads/Program 0.1*.exe") == (
        Path.home() / "Downloads",
        "Program 0.1*.exe",
    )
    assert splitglob("~/Downloads/Program[ms].exe") == (
        Path.home() / "Downloads",
        "Program[ms].exe",
    )
    assert splitglob("~/Downloads/Program.exe") == (
        Path.home() / "Downloads" / "Program.exe",
        "",
    )
    # https://github.com/tfeldmann/organize/issues/40
    assert splitglob("~/Ältere/Erträgnisaufstellung_*.pdf") == (
        Path.home() / "Ältere",
        "Erträgnisaufstellung_*.pdf",
    )
    # https://github.com/tfeldmann/organize/issues/39
    assert splitglob("~/Downloads/*.pdf") == (Path.home() / "Downloads",
                                              "*.pdf")
示例#3
0
def test_splitglob():
    assert splitglob("~/Downloads") == (Path.home() / "Downloads", "")
    assert splitglob(r"/Test/\* tmp\*/*[!H]/**/*.*") == (
        Path(r"/Test/\* tmp\*"),
        "*[!H]/**/*.*",
    )
    assert splitglob("~/Downloads/Program 0.1*.exe") == (
        Path.home() / "Downloads",
        "Program 0.1*.exe",
    )
    assert splitglob("~/Downloads/Program[ms].exe") == (
        Path.home() / "Downloads",
        "Program[ms].exe",
    )
    assert splitglob("~/Downloads/Program.exe") == (
        Path.home() / "Downloads" / "Program.exe",
        "",
    )
示例#4
0
def test_splitglob():
    assert splitglob('~/Downloads') == (Path.home() / 'Downloads', '')
    assert (splitglob('/Test/\* tmp\*/*[!H]/**/*.*') == (
        Path('/Test/\* tmp\*'), '*[!H]/**/*.*'))