mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-08 15:05:17 +02:00
feat: +unit test
This commit is contained in:
parent
cbad5170ac
commit
b8902bd471
1 changed files with 6 additions and 0 deletions
|
|
@ -24,6 +24,7 @@ async def test_project_repo():
|
|||
|
||||
pr = ProjectRepo(root=str(root))
|
||||
assert pr.git_repo.workdir == root
|
||||
assert pr.workdir == pr.git_repo.workdir
|
||||
|
||||
await pr.save(filename=REQUIREMENT_FILENAME, content=REQUIREMENT_FILENAME)
|
||||
doc = await pr.get(filename=REQUIREMENT_FILENAME)
|
||||
|
|
@ -51,6 +52,11 @@ async def test_project_repo():
|
|||
assert pr.docs.prd.changed_files
|
||||
assert not pr.tests.changed_files
|
||||
|
||||
with pytest.raises(ValueError):
|
||||
pr.srcs
|
||||
assert pr.with_src_path("test_src").srcs.root_path == Path("test_src")
|
||||
assert pr.src_relative_path == Path("test_src")
|
||||
|
||||
pr.git_repo.delete_repository()
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue