Merge pull request #396 from codeflash-ai/e2e-test-discovery-fixes
Fix broken test discovery in end to end test CF-203
This commit is contained in:
commit
abd9375262
2 changed files with 11 additions and 1 deletions
|
|
@ -91,7 +91,7 @@ def parse_args() -> Namespace:
|
|||
type=str,
|
||||
help="Path to the test directory of the project, where all the tests are located.",
|
||||
)
|
||||
parser.add_argument("--test-framework", choices=["pytest", "unittest"])
|
||||
parser.add_argument("--test-framework", choices=["pytest", "unittest"], default="pytest")
|
||||
parser.add_argument(
|
||||
"--config-file",
|
||||
type=str,
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ def main():
|
|||
"bubble_sort.py",
|
||||
"--function",
|
||||
"sorter",
|
||||
"--test-framework",
|
||||
"pytest",
|
||||
"--tests-root",
|
||||
str(test_root),
|
||||
"--module-root",
|
||||
|
|
@ -52,6 +54,14 @@ def main():
|
|||
improvement_x > 300
|
||||
), f"Performance improvement rate was {improvement_x}x, which was not above 300x"
|
||||
|
||||
# Check for the line indicating the number of discovered existing unit tests
|
||||
unit_test_search = re.search(
|
||||
r"Discovered (\d+) existing unit tests",
|
||||
stdout,
|
||||
)
|
||||
num_unit_tests = int(unit_test_search.group(1))
|
||||
assert num_unit_tests > 0, f"Could not find existing unit tests"
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
|
|||
Loading…
Reference in a new issue