========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================= test session starts ==========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
platform linux -- Python 3.10.12, pytest-9.0.3, pluggy-1.6.0 -- /usr/bin/python3
cachedir: .pytest_cache
metadata: {'Python': '3.10.12', 'Platform': 'Linux-6.8.0-1026-gke-x86_64-with-glibc2.35', 'Packages': {'pytest': '9.0.3', 'pluggy': '1.6.0'}, 'Plugins': {'metadata': '3.1.1', 'anyio': '4.13.0', 'cov': '7.1.0', 'json-report': '1.5.0'}}
rootdir: /workspace/imapclient
configfile: pyproject.toml
plugins: metadata-3.1.1, anyio-4.13.0, cov-7.1.0, json-report-1.5.0
collected 21 items

tests/test_response_parser.py::TestParseResponse::test_bad_literal PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [  4%]
tests/test_response_parser.py::TestParseResponse::test_bad_quoting PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [  9%]
tests/test_response_parser.py::TestParseResponse::test_complex_mixed PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [ 14%]
tests/test_response_parser.py::TestParseResponse::test_deeper_nest_tuple PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [ 19%]
tests/test_response_parser.py::TestParseResponse::test_empty_tuple PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [ 23%]
tests/test_response_parser.py::TestParseResponse::test_envelopey PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [ 28%]
tests/test_response_parser.py::TestParseResponse::test_envelopey_quoted PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   [ 33%]
tests/test_response_parser.py::TestParseResponse::test_incomplete_tuple FAILED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   [ 38%]
tests/test_response_parser.py::TestParseResponse::test_int PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [ 42%]
tests/test_response_parser.py::TestParseResponse::test_int_and_tuple PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [ 47%]
tests/test_response_parser.py::TestParseResponse::test_int_zero PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           [ 52%]
tests/test_response_parser.py::TestParseResponse::test_literal PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [ 57%]
tests/test_response_parser.py::TestParseResponse::test_literal_with_more PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [ 61%]
tests/test_response_parser.py::TestParseResponse::test_nested_tuple PASSED                                                                                                                                                                                                                                                                                                                                                                                               <response clipped><NOTE>Due to the max output limit, only part of the full response has been shown to you.</NOTE>                                                                                                                                                                                                                                                                                                                                            [ 76%]
tests/test_response_parser.py::TestParseResponse::test_quoted_specials PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [ 80%]
tests/test_response_parser.py::TestParseResponse::test_square_brackets PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [ 85%]
tests/test_response_parser.py::TestParseResponse::test_string PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             [ 90%]
tests/test_response_parser.py::TestParseResponse::test_tuple PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [ 95%]
tests/test_response_parser.py::TestParseResponse::test_unquoted PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           [100%]

=============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================== FAILURES ===============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
_______________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________ TestParseResponse.test_incomplete_tuple ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

    def parse_response(data: List[bytes]) -> Tuple[_Atom, ...]:
        """Pull apart IMAP command responses.

        Returns nested tuples of appropriately typed objects.
        """
        try:
>           return tuple(_parse_tokens(TokenSource(data)))

imapclient/response_parser.py:25:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _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_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

tokens = <imapclient.response_lexer.TokenSource object at 0x7eb23078bc70>

    def _parse_tuple(tokens: TokenSource) -> Tuple[_Atom, ...]:
        out = []
        for tok in tokens:
            if tok == b')':
                return tuple(out)
            elif tok == b'(':
                out.append(_parse_tuple(tokens))
            elif tok == b'NIL':
                out.append(None)
            elif tok.startswith(b'"') and tok.endswith(b'"'):
                out.append(_unquote(tok))
            elif tok.startswith(b'{'):
                out.append(tokens.current_literal)
            else:
                out.append(_atom(tok))
>       raise ProtocolError('Tuple incomplete')
E       imapclient.exceptions.ProtocolError: Tuple incomplete

imapclient/response_parser.py:64: ProtocolError

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/workspace/imapclient/imapclient/response_parser.py", line 25, in parse_response
    return tuple(_parse_tokens(TokenSource(data)))
  File "/workspace/imapclient/imapclient/response_parser.py", line 39, in _parse_tokens
    yield _parse_tuple(tokens)
  File "/workspace/imapclient/imapclient/response_parser.py", line 64, in _parse_tuple
    raise ProtocolError('Tuple incomplete')
imapclient.exceptions.ProtocolError: Tuple incomplete

During handling of the above exception, another exception occurred:

imapclient.exceptions.ProtocolError: Tuple incomplete before "b'(1 2'"

During handling of the above exception, another exception occurred:

self = <tests.test_response_parser.TestParseResponse testMethod=test_incomplete_tuple>

    def test_incomplete_tuple(self):
>       self._test_parse_error(b"abc (1 2", r'Tuple incomplete before "\(1 2"')

tests/test_response_parser.py:174:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_response_parser.py:196: in _test_parse_error
    self.assertRaisesRegex(ProtocolError, expected_msg, parse_response, to_parse)
E   AssertionError: "Tuple incomplete before "\(1 2"" does not match "Tuple incomplete before "b'(1 2'""
======================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================= short test summary info ========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
FAILED tests/test_response_parser.py::TestParseResponse::test_incomplete_tuple - AssertionError: "Tuple incomplete before "\(1 2"" does not match "Tuple incomplete before "b'(1 2'""
===================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================== 1 failed, 20 passed in 0.09s =====================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
[The command completed with exit code 1.]
[Current working directory: /workspace/imapclient]
[Python interpreter: /usr/bin/python]
[Command finished with exit code 1]