Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-5399

Python: Fix Session.strerror()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: None
    • Labels:
      None

      Description

      We expect the following code inserted into the test suite to work:

       def test_strerror(self):
        err = wiredtiger.WT_NOTFOUND
        notfound_str = 'WT_NOTFOUND: item not found'
        self.assertEqual(wiredtiger.wiredtiger_strerror(err), notfound_str)
        self.assertEqual(self.session.strerror(err), notfound_str)

      But it doesn't, the second assertEqual fails:

       File "..../test/suite/test_base01.py", line 107, in test_strerror
          self.assertEqual(self.session.strerror(err), notfound_str)
      WiredTigerError: Unknown error 656412725 

      It probably has to do with the return type not being an integer.  We have a SWIG rule that checks return values and if not zero and not WT_NOTFOUND, we'll generate an exception.

        Attachments

          Activity

            People

            Assignee:
            backlog-server-storage-engines Backlog - Storage Engines Team
            Reporter:
            donald.anderson Donald Anderson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: