diff --git a/ServerCode/BubbleScan_AI/tests/test_align.py b/ServerCode/BubbleScan_AI/tests/test_align.py index 7db42ee..e4eccbe 100644 --- a/ServerCode/BubbleScan_AI/tests/test_align.py +++ b/ServerCode/BubbleScan_AI/tests/test_align.py @@ -15,7 +15,7 @@ def test_correct_alignment(self): cv2.circle(template, (500, 500), 50, (255, 255, 255), -1) # Circle in the template # Instantiate the Scantron95945 class - scantron = Scantron95945('BubbleScan_AI/PDF/Scans-4-2-24.pdf') + scantron = Scantron95945('PDF/Scans-4-2-24.pdf') # Align the image with the template aligned = scantron.align_image(image, template) @@ -31,7 +31,7 @@ def test_missing_keypoints(self): template = np.zeros((1000, 1000, 3), dtype=np.uint8) # Instantiate the Scantron95945 class - scantron = Scantron95945('BubbleScan_AI/PDF/Scans-4-2-24.pdf') + scantron = Scantron95945('PDF/Scans-4-2-24.pdf') # Attempt to align the image with the template aligned = scantron.align_image(image, template) diff --git a/ServerCode/BubbleScan_AI/tests/test_bubble_detection.py b/ServerCode/BubbleScan_AI/tests/test_bubble_detection.py index 80bd996..5521a51 100644 --- a/ServerCode/BubbleScan_AI/tests/test_bubble_detection.py +++ b/ServerCode/BubbleScan_AI/tests/test_bubble_detection.py @@ -16,7 +16,7 @@ def test_get_responses_bubble_row_single_fill(self): cv2.circle(image, (x_center, 50), 30, (0, 0, 0), -1) # Black filled circle # Instantiate the TestScantron95945 class - scantron = Scantron95945TestHelper('BubbleScan_AI/PDF/Scans-4-2-24.pdf') + scantron = Scantron95945TestHelper('PDF/Scans-4-2-24.pdf') # Get the response from the image response = scantron.get_responses_bubble_row(image) @@ -37,7 +37,7 @@ def test_get_responses_bubble_row_multiple_fills(self): cv2.circle(image, (x_center_B, 50), 30, (0, 0, 0), -1) # Black filled circle for 'B' # Instantiate the TestScantron95945 class - scantron = Scantron95945TestHelper('BubbleScan_AI/PDF/Scans-4-2-24.pdf') + scantron = Scantron95945TestHelper('PDF/Scans-4-2-24.pdf') # Get the response from the image response = scantron.get_responses_bubble_row(image) @@ -54,7 +54,7 @@ def test_bubble_column_single_fill(self): cv2.rectangle(column, (0, 400), (100, 500), 255, -1) # Filling bubble at index 4 # Instantiate the Scantron95945 class - scantron = Scantron95945('BubbleScan_AI/PDF/Scans-4-2-24.pdf') + scantron = Scantron95945('PDF/Scans-4-2-24.pdf') # Get the index of the filled bubble index = scantron.bubble_column(column) @@ -69,7 +69,7 @@ def test_bubble_column_no_fill(self): column = np.zeros((1000, 100, 1), dtype=np.uint8) # Instantiate the Scantron95945 class - scantron = Scantron95945('BubbleScan_AI/PDF/Scans-4-2-24.pdf') + scantron = Scantron95945('PDF/Scans-4-2-24.pdf') # Get the index of the filled bubble index = scantron.bubble_column(column) diff --git a/ServerCode/BubbleScan_AI/tests/test_error_handling.py b/ServerCode/BubbleScan_AI/tests/test_error_handling.py index 42c3de0..467c981 100644 --- a/ServerCode/BubbleScan_AI/tests/test_error_handling.py +++ b/ServerCode/BubbleScan_AI/tests/test_error_handling.py @@ -4,7 +4,7 @@ from BubbleScan_AI.Scantron import Scantron95945 class TestErrorHandling: - """Test how the system handles a corrupted PDF file.""" + """Test how the system handles a corrupted `PDF file.""" @patch('fitz.open') def test_corrupted_pdf_handling(self, mock_fitz_open): """Test how the system handles a corrupted PDF file.""" @@ -20,7 +20,7 @@ def test_missing_image_files(self): """Test how the system handles missing image files during template matching.""" # Instantiate the Scantron95945 class - scantron = Scantron95945('BubbleScan_AI/PDF/Scans-4-2-24.pdf') + scantron = Scantron95945('PDF/Scans-4-2-24.pdf') # Mock os.listdir to return an empty list (no image files) with patch('os.listdir', return_value=[]): diff --git a/ServerCode/BubbleScan_AI/tests/test_id.py b/ServerCode/BubbleScan_AI/tests/test_id.py index ac2615d..0f11cfb 100644 --- a/ServerCode/BubbleScan_AI/tests/test_id.py +++ b/ServerCode/BubbleScan_AI/tests/test_id.py @@ -28,7 +28,7 @@ def test_complete_student_id(self): roi_color = cv2.cvtColor(roi, cv2.COLOR_GRAY2BGR) # Instantiate the Scantron95945 class - scantron = Scantron95945('BubbleScan_AI/PDF/Scans-4-2-24.pdf') + scantron = Scantron95945('PDF/Scans-4-2-24.pdf') # Extract the student ID student_id = scantron.student_id(roi_color) @@ -59,7 +59,7 @@ def test_incomplete_student_id(self): roi_color = cv2.cvtColor(roi, cv2.COLOR_GRAY2BGR) # Instantiate the Scantron95945 class - scantron = Scantron95945('BubbleScan_AI/PDF/Scans-4-2-24.pdf') + scantron = Scantron95945('PDF/Scans-4-2-24.pdf') # Extract the student ID student_id = scantron.student_id(roi_color)