Failing cesmd_fetcher_test.py for Windows
When testing gmprocess
on Windows, test_CESMDFetcher()
always fails after being unable to locate the appropriate .zip
file.
This may be due to lingering issues with our mixed use of os.path
and pathlib.Path
, which has led to Windows path issues previously.
With stubborn test failures on Windows, we've sometimes told PyTest to just skip them when the OS is Windows. I believe the only example of that is in gmworkspace_test.py
with test_describe()
and test_storage
, which are marked with:
@pytest.mark.skipif(sys.platform.startswith("win"), reason="Does not work in Windows")
That's not a very satisfying way to handle this, but the justification is that the errors may arise from the CI service (Azure) itself, and we have a difficult time debugging Windows issues directly.
The error seems to come from a try block dealing with zip files in cesmd_search.py
here, and yields the following output:
Could not unpack sub-zip file "nc73792396/nc73792396_CE65097/nc73792396_ce65097r.zip" due to error "[WinError 3] The system cannot find the path specified: 'C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\tmpcmdnz03x\\nc73792396\\nc73792396_CE65097\\nc73792396_ce65097r'". Skipping.
That may be related to how the code checks for the presence of .zip
endings in the try block, but the tests are also being ran from D:\a\1\s
(where the test data also resides) so the entire path construction seems wrong in this context.