mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-02 14:45:17 +02:00
Update test_incremental_dev.py
This commit is contained in:
parent
86b9d11f24
commit
8851147df7
1 changed files with 52 additions and 13 deletions
|
|
@ -28,9 +28,13 @@ def test_refined_simple_calculator():
|
|||
project_path,
|
||||
]
|
||||
result = runner.invoke(app, args)
|
||||
os.system("git tag refine")
|
||||
logger.info(result)
|
||||
logger.info(result.output)
|
||||
if "Aborting" in result.output:
|
||||
assert False
|
||||
else:
|
||||
os.system("git tag refine")
|
||||
assert True
|
||||
|
||||
|
||||
def test_refined_number_guessing_game():
|
||||
|
|
@ -44,9 +48,13 @@ def test_refined_number_guessing_game():
|
|||
project_path,
|
||||
]
|
||||
result = runner.invoke(app, args)
|
||||
os.system("git tag refine")
|
||||
logger.info(result)
|
||||
logger.info(result.output)
|
||||
if "Aborting" in result.output:
|
||||
assert False
|
||||
else:
|
||||
os.system("git tag refine")
|
||||
assert True
|
||||
|
||||
|
||||
def test_refined_dice_simulator_1():
|
||||
|
|
@ -58,12 +66,15 @@ def test_refined_dice_simulator_1():
|
|||
"--inc",
|
||||
"--project-path",
|
||||
project_path,
|
||||
"--no-code-review",
|
||||
]
|
||||
result = runner.invoke(app, args)
|
||||
os.system("git tag refine_1")
|
||||
logger.info(result)
|
||||
logger.info(result.output)
|
||||
if "Aborting" in result.output:
|
||||
assert False
|
||||
else:
|
||||
os.system("git tag refine_1")
|
||||
assert True
|
||||
|
||||
|
||||
def test_refined_dice_simulator_2():
|
||||
|
|
@ -75,12 +86,15 @@ def test_refined_dice_simulator_2():
|
|||
"--inc",
|
||||
"--project-path",
|
||||
project_path,
|
||||
"--no-code-review",
|
||||
]
|
||||
result = runner.invoke(app, args)
|
||||
os.system("git tag refine_2")
|
||||
logger.info(result)
|
||||
logger.info(result.output)
|
||||
if "Aborting" in result.output:
|
||||
assert False
|
||||
else:
|
||||
os.system("git tag refine_2")
|
||||
assert True
|
||||
|
||||
|
||||
def test_refined_dice_simulator_3():
|
||||
|
|
@ -92,12 +106,15 @@ def test_refined_dice_simulator_3():
|
|||
"--inc",
|
||||
"--project-path",
|
||||
project_path,
|
||||
"--no-code-review",
|
||||
]
|
||||
result = runner.invoke(app, args)
|
||||
os.system("git tag refine_3")
|
||||
logger.info(result)
|
||||
logger.info(result.output)
|
||||
if "Aborting" in result.output:
|
||||
assert False
|
||||
else:
|
||||
os.system("git tag refine_3")
|
||||
assert True
|
||||
|
||||
|
||||
def test_refined_pygame_2048_1():
|
||||
|
|
@ -111,9 +128,13 @@ def test_refined_pygame_2048_1():
|
|||
project_path,
|
||||
]
|
||||
result = runner.invoke(app, args)
|
||||
os.system("git tag refine_1")
|
||||
logger.info(result)
|
||||
logger.info(result.output)
|
||||
if "Aborting" in result.output:
|
||||
assert False
|
||||
else:
|
||||
os.system("git tag refine_1")
|
||||
assert True
|
||||
|
||||
|
||||
def test_refined_pygame_2048_2():
|
||||
|
|
@ -127,9 +148,13 @@ def test_refined_pygame_2048_2():
|
|||
project_path,
|
||||
]
|
||||
result = runner.invoke(app, args)
|
||||
os.system("git tag refine_2")
|
||||
logger.info(result)
|
||||
logger.info(result.output)
|
||||
if "Aborting" in result.output:
|
||||
assert False
|
||||
else:
|
||||
os.system("git tag refine_2")
|
||||
assert True
|
||||
|
||||
|
||||
def test_refined_pygame_2048_3():
|
||||
|
|
@ -143,9 +168,13 @@ def test_refined_pygame_2048_3():
|
|||
project_path,
|
||||
]
|
||||
result = runner.invoke(app, args)
|
||||
os.system("git tag refine_3")
|
||||
logger.info(result)
|
||||
logger.info(result.output)
|
||||
if "Aborting" in result.output:
|
||||
assert False
|
||||
else:
|
||||
os.system("git tag refine_3")
|
||||
assert True
|
||||
|
||||
|
||||
def test_refined_word_cloud_1():
|
||||
|
|
@ -159,9 +188,13 @@ def test_refined_word_cloud_1():
|
|||
project_path,
|
||||
]
|
||||
result = runner.invoke(app, args)
|
||||
os.system("git tag refine_1")
|
||||
logger.info(result)
|
||||
logger.info(result.output)
|
||||
if "Aborting" in result.output:
|
||||
assert False
|
||||
else:
|
||||
os.system("git tag refine_1")
|
||||
assert True
|
||||
|
||||
|
||||
def test_refined_word_cloud_2():
|
||||
|
|
@ -175,9 +208,13 @@ def test_refined_word_cloud_2():
|
|||
project_path,
|
||||
]
|
||||
result = runner.invoke(app, args)
|
||||
os.system("git tag refine_2")
|
||||
logger.info(result)
|
||||
logger.info(result.output)
|
||||
if "Aborting" in result.output:
|
||||
assert False
|
||||
else:
|
||||
os.system("git tag refine_2")
|
||||
assert True
|
||||
|
||||
|
||||
def check_or_create_base_tag(project_path):
|
||||
|
|
@ -194,8 +231,10 @@ def check_or_create_base_tag(project_path):
|
|||
if has_base_tag:
|
||||
logger.info("Base tag exists")
|
||||
# Switch to the 'base' branch if it exists
|
||||
stash_cmd = "git stash"
|
||||
switch_to_base_branch_cmd = "git checkout base"
|
||||
try:
|
||||
os.system(stash_cmd)
|
||||
os.system(switch_to_base_branch_cmd)
|
||||
logger.info("Switched to base branch")
|
||||
except Exception as e:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue