Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-2987

Test failure - test_errors on PyPy 7.3.7 due to a unicode str repr change

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.12.2, 3.13, 4.0
    • Affects Version/s: 4.0
    • Component/s: Tests
    • None

      The following tests fail on PyPy 7.3.7 due to a unicode str repr change:

      ======================================================================
      FAIL: test_unicode_strs_not_primary_error (test.test_errors.TestErrors)
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "/Users/shane/git/mongo-python-driver/test/test_errors.py", line 68, in test_unicode_strs_not_primary_error
          self._test_unicode_strs(exc)
        File "/Users/shane/git/mongo-python-driver/test/test_errors.py", line 51, in _test_unicode_strs
          "'errmsg': 'unicode \\U0001f40d'}", str(exc))
      AssertionError: "unicode 🐍, full error: {'errmsg': 'unicode \\U0001f40d'}" != "unicode 🐍, full error: {'errmsg': 'unicode 🐍'}"
      - unicode 🐍, full error: {'errmsg': 'unicode \U0001f40d'}
      ?                                            ^^^^^^^^^^
      + unicode 🐍, full error: {'errmsg': 'unicode 🐍'}
      ?                                            ^
      
      
      ======================================================================
      FAIL: test_unicode_strs_operation_failure (test.test_errors.TestErrors)
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "/Users/shane/git/mongo-python-driver/test/test_errors.py", line 63, in test_unicode_strs_operation_failure
          self._test_unicode_strs(exc)
        File "/Users/shane/git/mongo-python-driver/test/test_errors.py", line 51, in _test_unicode_strs
          "'errmsg': 'unicode \\U0001f40d'}", str(exc))
      AssertionError: "unicode 🐍, full error: {'errmsg': 'unicode \\U0001f40d'}" != "unicode 🐍, full error: {'errmsg': 'unicode 🐍'}"
      - unicode 🐍, full error: {'errmsg': 'unicode \U0001f40d'}
      ?                                            ^^^^^^^^^^
      + unicode 🐍, full error: {'errmsg': 'unicode 🐍'}
      ?                                            ^
      

      Fixed by: https://github.com/mongodb/mongo-python-driver/pull/770

      See also: https://github.com/10gen/mongo-python-toolchain/issues/26

            Assignee:
            shane.harvey@mongodb.com Shane Harvey
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: