|
22 | 22 | THE SOFTWARE.
|
23 | 23 | """
|
24 | 24 |
|
25 |
| -import unittest |
26 | 25 | import platform
|
| 26 | +import unittest |
27 | 27 | from unittest.mock import patch
|
28 | 28 |
|
29 | 29 | from scanoss.winnowing import Winnowing
|
@@ -134,35 +134,31 @@ def test_line_ending_detection(self):
|
134 | 134 |
|
135 | 135 | # Test LF only
|
136 | 136 | content_lf = b'line1\nline2\nline3\n'
|
137 |
| - has_crlf, has_lf, has_cr, has_mixed = winnowing._Winnowing__detect_line_endings(content_lf) |
| 137 | + has_crlf, has_lf, has_cr = winnowing._Winnowing__detect_line_endings(content_lf) |
138 | 138 | self.assertFalse(has_crlf)
|
139 | 139 | self.assertTrue(has_lf)
|
140 | 140 | self.assertFalse(has_cr)
|
141 |
| - self.assertFalse(has_mixed) |
142 | 141 |
|
143 | 142 | # Test CRLF only
|
144 | 143 | content_crlf = b'line1\r\nline2\r\nline3\r\n'
|
145 |
| - has_crlf, has_lf, has_cr, has_mixed = winnowing._Winnowing__detect_line_endings(content_crlf) |
| 144 | + has_crlf, has_lf, has_cr = winnowing._Winnowing__detect_line_endings(content_crlf) |
146 | 145 | self.assertTrue(has_crlf)
|
147 | 146 | self.assertFalse(has_lf)
|
148 | 147 | self.assertFalse(has_cr)
|
149 |
| - self.assertFalse(has_mixed) |
150 | 148 |
|
151 | 149 | # Test CR only (old Mac style)
|
152 | 150 | content_cr = b'line1\rline2\rline3\r'
|
153 |
| - has_crlf, has_lf, has_cr, has_mixed = winnowing._Winnowing__detect_line_endings(content_cr) |
| 151 | + has_crlf, has_lf, has_cr = winnowing._Winnowing__detect_line_endings(content_cr) |
154 | 152 | self.assertFalse(has_crlf)
|
155 | 153 | self.assertFalse(has_lf)
|
156 | 154 | self.assertTrue(has_cr)
|
157 |
| - self.assertFalse(has_mixed) |
158 | 155 |
|
159 | 156 | # Test mixed CRLF and LF
|
160 | 157 | content_mixed = b'line1\r\nline2\nline3\r\n'
|
161 |
| - has_crlf, has_lf, has_cr, has_mixed = winnowing._Winnowing__detect_line_endings(content_mixed) |
| 158 | + has_crlf, has_lf, has_cr = winnowing._Winnowing__detect_line_endings(content_mixed) |
162 | 159 | self.assertTrue(has_crlf)
|
163 | 160 | self.assertTrue(has_lf)
|
164 | 161 | self.assertFalse(has_cr)
|
165 |
| - self.assertTrue(has_mixed) |
166 | 162 |
|
167 | 163 | def test_opposite_hash_logic(self):
|
168 | 164 | """Test the logic of opposite hash calculation."""
|
|
0 commit comments