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', ''))
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")
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", "", )
def test_splitglob(): assert splitglob('~/Downloads') == (Path.home() / 'Downloads', '') assert (splitglob('/Test/\* tmp\*/*[!H]/**/*.*') == ( Path('/Test/\* tmp\*'), '*[!H]/**/*.*'))