VH-Lab / DID-matlab

Data Interface Database
Other
1 stars 1 forks source link

one test failing on main_v080_refactor #72

Closed stevevanhooser closed 1 month ago

stevevanhooser commented 1 month ago

Almost all the tests are passing online, except one:

Error occurred in did.unittest.TestFileDocument/testFileDocumentOperations and it did not run to completion.
    ---------
    Error ID:
    ---------
    'MATLAB:validators:mustBeFolder'
    --------------
    Error Details:
    --------------
    Error using did.file.fileCache (line 40)
    Invalid argument at position 1. The following folders do not exist:
    'Documents/DID/fileCache'.

The failure is occurring because, at startup, the path [userpath filesep 'Documents' filesep 'DID' filesep 'fileCache'] is not created. We need to substitute this functionality formerly provided by did_Init.m.

https://github.com/VH-Lab/DID-matlab/runs/31651093846

Do you think you can add a setup file @ehennestad ?

Thanks! Steve

stevevanhooser commented 1 month ago

The tests are like a video game...I modified your test so that it prints the full stack of the Exception, which makes the output a lot more verbose when things are fine but makes it easy to see where things go wrong when a test fails

ehennestad commented 1 month ago
The failure is occurring because, at startup, the path [userpath filesep 'Documents' filesep 'DID' filesep 'fileCache'] is not created.
We need to substitute this functionality formerly provided by did_Init.m.

The problem is that userpath on linux is often an empty string, so the path evaluates to Documents/DID/etc and I think this can not be created. I will look into the best way to fix this

ehennestad commented 1 month ago

The tests are like a video game...I modified your test so that it prints the full stack of the Exception, which makes the output a lot more verbose when things are fine but makes it easy to see where things go wrong when a test fails

Maybe the display of the error stack can be done only if the error code is something else than expected

stevevanhooser commented 1 month ago

Sounds good..check for the substring first and then display. Makes sense.

stevevanhooser commented 1 month ago

(or just include the report in the assert I guess)

stevevanhooser commented 1 month ago

Because the remote tests are passing, we can close this, right?