def test_globbing_by_suffix(self): base = URI("memory:///") a = base / "a.foo" b = base / "b.bar" for f in [a, b]: with f.open("w") as outf: outf.write("foo") self.assertEqual([a], base.glob("a.*"))
def test_globbing_by_prefix_in_subdir(self): base = URI("memory:///") / "dir" base.mkdir() a = base / "a.foo" b = base / "b.bar" for f in [a, b]: with f.open("w") as outf: outf.write("foo") self.assertEqual([a], base.glob("*.foo"))