|
1 | 1 | import unittest |
| 2 | +from unittest.mock import MagicMock, patch |
2 | 3 |
|
3 | 4 | from parameterized import parameterized |
4 | | -from unittest.mock import MagicMock, patch |
| 5 | + |
5 | 6 | from ai_data_preprocessing_queue.Pipeline import Pipeline |
6 | 7 | from ai_data_preprocessing_queue.Steps.remove_signature import ( |
7 | | - step, remove_greetings_and_following_text, remove_newline) |
| 8 | + remove_greetings_and_following_text, remove_newline, step) |
8 | 9 |
|
9 | 10 |
|
10 | 11 | class TestRemoveSignature(unittest.TestCase): |
11 | | - @parameterized.expand([ # type: ignore[misc] |
| 12 | + @parameterized.expand([ # type: ignore[untyped-decorator] |
12 | 13 | ( |
13 | 14 | "multiple_newlines", |
14 | 15 | "Could you please review the attached document?\n\n\nI need your feedback by Friday.", |
@@ -38,7 +39,7 @@ class TestRemoveSignature(unittest.TestCase): |
38 | 39 | def test_remove_newline(self, name: str, input_text: str, expected: str) -> None: |
39 | 40 | self.assertEqual(remove_newline(input_text), expected) |
40 | 41 |
|
41 | | - @parameterized.expand([ # type: ignore[misc] |
| 42 | + @parameterized.expand([ # type: ignore[untyped-decorator] |
42 | 43 | ( |
43 | 44 | "english_signature_basic", |
44 | 45 | "Here's the project update. Sincerely, John Smith\nProject Manager", |
@@ -88,7 +89,7 @@ def test_remove_newline(self, name: str, input_text: str, expected: str) -> None |
88 | 89 | def test_remove_greetings_and_following_text(self, name: str, input_text: str, expected: str) -> None: |
89 | 90 | self.assertEqual(remove_greetings_and_following_text(input_text), expected) |
90 | 91 |
|
91 | | - @parameterized.expand([ # type: ignore[misc] |
| 92 | + @parameterized.expand([ # type: ignore[untyped-decorator] |
92 | 93 | ( |
93 | 94 | "remove_signature_basic", |
94 | 95 | "We're sending the final draft for review. Best regards, Alice Johnson\nProject Lead", |
@@ -151,3 +152,4 @@ def test_remove_signature_step_error(self, _: MagicMock) -> None: |
151 | 152 |
|
152 | 153 | if __name__ == "__main__": |
153 | 154 | unittest.main() |
| 155 | + unittest.main() |
0 commit comments