Skip to content

A test fails on Windows

One of the tests in tests/storage.tst fails on Windows.

To be specific. This test is failing

%!shared id, s
%! s = "This is a unique string for testing";
%! id = __py_objstore_put__ (s);

...

%!test
%! list = __py_objstore_list__ ();
%! idx = find ([list.key] == id);
%! assert (numel (idx), 1)

...

To me it looks like id is a 64-bit number, but list.key is a 32-bit number. When both id and list.key should be the same.

Using PyLong_AsUnsignedLongLong over PyLong_AsUnsignedLong should most probably solve the issue.

This issue may be linked with #59.

I am using a 64-bit version of Python and Octave.


The required part of fntests.log:

>>>>> processing storage.tst
***** test
 list = __py_objstore_list__ ();
 idx = find ([list.key] == id);
 assert (numel (idx), 1)
 assert (list(idx).count, uint64 (1))
 assert (list(idx).key, id)
 assert (list(idx).type, "str")
 assert (list(idx).value, s)
!!!!! test failed
ASSERT errors for:  assert (numel (idx),1)

  Location  |  Observed  |  Expected  |  Reason
     ()           0            1         Abs err 1 exceeds tol 0 by 1
shared variables     id = 1909251703792
    s = This is a unique string for testing