(
self, test_interpreter1, test_interpreter2, invalid_interpreter
)
| 169 | self.assert_error(results[0], invalid_interpreter) |
| 170 | |
| 171 | def test_iter_interpreter_mixed( |
| 172 | self, test_interpreter1, test_interpreter2, invalid_interpreter |
| 173 | ): |
| 174 | # type: (str, str, str) -> None |
| 175 | results = list( |
| 176 | PythonInterpreter.iter_candidates( |
| 177 | paths=[test_interpreter1, invalid_interpreter, test_interpreter2] |
| 178 | ) |
| 179 | ) |
| 180 | |
| 181 | assert len(results) == 3 |
| 182 | assert [ |
| 183 | PythonInterpreter.from_binary(path) for path in (test_interpreter1, test_interpreter2) |
| 184 | ] == [result for result in results if isinstance(result, PythonInterpreter)] |
| 185 | errors = [result for result in results if not isinstance(result, PythonInterpreter)] |
| 186 | assert len(errors) == 1 |
| 187 | self.assert_error(errors[0], invalid_interpreter) |
| 188 | |
| 189 | def test_iter_interpreter_path_filter(self, test_interpreter1, test_interpreter2): |
| 190 | # type: (str, str) -> None |
nothing calls this directly
no test coverage detected