Sborole commited on
Commit
332a9d0
·
verified ·
1 Parent(s): be46f0f

Delete tools/generate_test_cases

Browse files
Files changed (1) hide show
  1. tools/generate_test_cases +0 -38
tools/generate_test_cases DELETED
@@ -1,38 +0,0 @@
1
- from typing import List, Dict
2
-
3
- def generate_test_cases(topic: str) -> List[Dict[str, str]]:
4
- """
5
- Suggest simple QA test cases for a given topic.
6
-
7
- Args:
8
- topic: The feature, function, or topic to generate test cases for.
9
-
10
- Returns:
11
- A list of test cases, each with input and expected output.
12
- """
13
- topic_lower = topic.lower()
14
- test_cases = []
15
-
16
- if "login" in topic_lower:
17
- test_cases = [
18
- {"test_case": "Valid login", "input": "Correct username/password", "expected_output": "User is logged in successfully"},
19
- {"test_case": "Invalid password", "input": "Wrong password", "expected_output": "Error message displayed"},
20
- {"test_case": "Empty username", "input": "Username left blank", "expected_output": "Error message displayed"},
21
- {"test_case": "Empty password", "input": "Password left blank", "expected_output": "Error message displayed"},
22
- ]
23
- elif "calculator" in topic_lower:
24
- test_cases = [
25
- {"test_case": "Addition", "input": "2 + 3", "expected_output": "5"},
26
- {"test_case": "Subtraction", "input": "5 - 2", "expected_output": "3"},
27
- {"test_case": "Multiplication", "input": "4 * 5", "expected_output": "20"},
28
- {"test_case": "Divide by zero", "input": "5 / 0", "expected_output": "Error handled gracefully"},
29
- ]
30
- else:
31
- # Generic template
32
- test_cases = [
33
- {"test_case": f"Test case 1 for {topic}", "input": "Sample input", "expected_output": "Expected behavior"},
34
- {"test_case": f"Test case 2 for {topic}", "input": "Another input", "expected_output": "Expected behavior"},
35
- {"test_case": f"Test case 3 for {topic}", "input": "Additional input", "expected_output": "Expected behavior"},
36
- ]
37
-
38
- return test_cases