-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_resume_parser_manual.py
More file actions
41 lines (30 loc) · 1.02 KB
/
test_resume_parser_manual.py
File metadata and controls
41 lines (30 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import sys
import os
# Add backend directory to sys.path
sys.path.append(os.path.join(os.getcwd(), 'backend'))
from app.services.resume_parser import generate_analytics
def test_analytics():
print("Testing generate_analytics...")
# Sample Mock Resume Text
sample_text = """
John Doe
Software Engineer
Skills:
- Python, Java, C++
- React, SQL, Docker
- Cloud technologies like AWS and Azure
Experience:
Senior Developer at Tech Corp.
"""
analytics = generate_analytics(sample_text)
print(f"Analytics Result: {analytics}")
expected_skills = ['Python', 'Java', 'C++', 'React', 'SQL', 'Docker', 'AWS', 'Azure']
detected = analytics.get('skills_detected', [])
# Check intersection
missing = [s for s in expected_skills if s not in detected]
if not missing:
print("SUCCESS: All expected skills detected.")
else:
print(f"FAILURE: Missing skills: {missing}")
if __name__ == "__main__":
test_analytics()