def test_computeRootPath(path, expected): assert DIRAC._computeRootPath(path) == expected # Trailing / shouldn't affect the rootPath assert DIRAC._computeRootPath(path + "//") == expected if path != "/": assert DIRAC._computeRootPath(path.rstrip("/")) == expected