test: added unit tests for rag (#298)

* test: added unit tests for rag

* reformate the code
This commit is contained in:
Willem Jiang
2025-06-11 19:46:08 +08:00
committed by GitHub
parent 2554e4ba63
commit ee1af78767
3 changed files with 253 additions and 9 deletions

View File

@@ -122,12 +122,3 @@ def parse_uri(uri: str) -> tuple[str, str]:
if parsed.scheme != "rag":
raise ValueError(f"Invalid URI: {uri}")
return parsed.path.split("/")[1], parsed.fragment
if __name__ == "__main__":
uri = "rag://dataset/123#abc"
parsed = urlparse(uri)
print(parsed.scheme)
print(parsed.netloc)
print(parsed.path)
print(parsed.fragment)