-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hardcoded File Path Causing Test Failure #860
Comments
Yeah this should really be a list of paths since that file path will assume any paths that match the dsfiles_mf_ne30 = [current_path / "meshfiles" / "ugrid" / "outCSne30" / "outCSne30_var2.nc",
current_path / "meshfiles" / "ugrid" / "outCSne30" / "outCSne30_vortex.nc"] |
Even though explicitly listing the file names to be opened with That is common practice to have multiple data files from the same workflow in the same folder, e.g. separate files for different time stamps in a time-series analysis or separate files for different variables in a big simulation. That said, if we think all of the files under the
|
Thank you for your input! I will move the test files needed for zonal-mean testing ( Does this sound like a good solution for the zonal-mean PR failing the API test? |
Before that, please determine if those newer zonal test files are very close in format/content with the original
If that's not the case though, then your suggestion looks good. |
Thank you for your suggestion. I believe the zonal test files are in close format with the original test files. I have updated the The new test/test_api.py uxds_mf_ne30.uxgrid._ds.data_vars: Therefore, I also modified the test constants in If this solution to the |
Yes, this looks like a good solution to me; thanks a lot! Hey @philipc2 , do you agree with me that this will be a better solution forward? |
Description
The hard coded file path in
test/test_api.py::TestAPI::test_open_mf_dataset
is unsafe. I added a test file totest/meshfiles/ugrid/outCSne30/outCSne30_test2.nc
from Paul, and it failed.Details
The test test/test_api.py::TestAPI::test_open_mf_dataset is failing after I added test/meshfiles/ugrid/outCSne30/outCSne30_test2.nc.
I think the reason is because of this hardcoded file path incorrectly matching outCSne30_test2.nc.
Error Message
The text was updated successfully, but these errors were encountered: