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

Python: Fix Session.strerror()

      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.

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            donald.anderson@mongodb.com Donald Anderson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: