rpmoseley / pyisam

C-ISAM/VBISAM interface using ctypes or cffi
GNU General Public License v3.0
4 stars 1 forks source link

tests 12, 13 fail #2

Open alexbodn opened 1 month ago

alexbodn commented 1 month ago

hello friends

many thanks for pyisam. i tried the tests for example invokation, and the batch of tests fails at 12, with isam not open.

rpmoseley commented 1 month ago

The test12 had been changed assuming that the first read() on an ISAM file would also open it, I now realise that the appropriate arguments are not passed to that call, so the underlying file must be opened explicitly using the open() call. I am currently also working on adding the ability to perform record number access so will push when I have completed this.

alexbodn commented 1 month ago

thanks friend

rpmoseley commented 3 weeks ago

I have pushed the changes necessary to make the test12 work as expected. I had a small problem in that the ctypes backend was failing to return valid data, turned out to be passing a copy of the raw data rather the buffer itself. You should expect a list of lines that defines the table 'defile' numbered from 10 to 150.

In order to use the deferred opening of the tables, when you create the instance of the ISAMtable you pass keyword arguments of 'mode' and 'lock' to set the open and lock modes that will be used when the ISAM file is actually opened. The argument processing of the read() method has changed to correctly handle the expected calling sequences.

alexbodn commented 2 weeks ago

thank you @rpmoseley , i'm syncing my fork