Skip to content
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

re-enable tests on windows #193

Closed
wants to merge 4 commits into from

Conversation

akrherz
Copy link
Contributor

@akrherz akrherz commented Mar 28, 2022

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

Re-enabling tests per windows build fun with #192

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@akrherz akrherz marked this pull request as draft March 28, 2022 21:18
@akrherz
Copy link
Contributor Author

akrherz commented Mar 29, 2022

windows test failures. I wonder if setuptools is to blame :)

2022-03-28T21:58:50.0378442Z ================================== FAILURES ===================================
2022-03-28T21:58:50.0379353Z ____________________________ test_gdal_data_wheel _____________________________
2022-03-28T21:58:50.0380010Z 
2022-03-28T21:58:50.0380623Z     @pytest.mark.wheel
2022-03-28T21:58:50.0381917Z     def test_gdal_data_wheel():
2022-03-28T21:58:50.0382445Z         """Get GDAL data path from a wheel"""
2022-03-28T21:58:50.0383141Z >       assert GDALDataFinder().search() == os.path.join(os.path.dirname(fiona.__file__), 'gdal_data')
2022-03-28T21:58:50.0384144Z E       AssertionError: assert None == 'D:\\bld\\fiona_1648502623372\\_test_env\\lib\\site-packages\\fiona\\gdal_data'
2022-03-28T21:58:50.0384978Z E        +  where None = <bound method GDALDataFinder.search of <fiona._env.GDALDataFinder object at 0x000001EBD0E47C48>>()
2022-03-28T21:58:50.0391867Z E        +    where <bound method GDALDataFinder.search of <fiona._env.GDALDataFinder object at 0x000001EBD0E47C48>> = <fiona._env.GDALDataFinder object at 0x000001EBD0E47C48>.search
2022-03-28T21:58:50.0395773Z E        +      where <fiona._env.GDALDataFinder object at 0x000001EBD0E47C48> = GDALDataFinder()
2022-03-28T21:58:50.0397078Z E        +  and   'D:\\bld\\fiona_1648502623372\\_test_env\\lib\\site-packages\\fiona\\gdal_data' = <function join at 0x000001EBCCBC8F78>('D:\\bld\\fiona_1648502623372\\_test_env\\lib\\site-packages\\fiona', 'gdal_data')
2022-03-28T21:58:50.0398448Z E        +    where <function join at 0x000001EBCCBC8F78> = <module 'ntpath' from 'D:\\bld\\fiona_1648502623372\\_test_env\\lib\\ntpath.py'>.join
2022-03-28T21:58:50.0399543Z E        +      where <module 'ntpath' from 'D:\\bld\\fiona_1648502623372\\_test_env\\lib\\ntpath.py'> = os.path
2022-03-28T21:58:50.0400684Z E        +    and   'D:\\bld\\fiona_1648502623372\\_test_env\\lib\\site-packages\\fiona' = <function dirname at 0x000001EBCCBCA288>('D:\\bld\\fiona_1648502623372\\_test_env\\lib\\site-packages\\fiona\\__init__.py')
2022-03-28T21:58:50.0402246Z E        +      where <function dirname at 0x000001EBCCBCA288> = <module 'ntpath' from 'D:\\bld\\fiona_1648502623372\\_test_env\\lib\\ntpath.py'>.dirname
2022-03-28T21:58:50.0403170Z E        +        where <module 'ntpath' from 'D:\\bld\\fiona_1648502623372\\_test_env\\lib\\ntpath.py'> = os.path
2022-03-28T21:58:50.0409685Z E        +      and   'D:\\bld\\fiona_1648502623372\\_test_env\\lib\\site-packages\\fiona\\__init__.py' = fiona.__file__
2022-03-28T21:58:50.0410380Z 
2022-03-28T21:58:50.0411099Z tests\test_data_paths.py:16: AssertionError
2022-03-28T21:58:50.0411822Z ____________________________ test_proj_data_wheel _____________________________
2022-03-28T21:58:50.0412245Z 
2022-03-28T21:58:50.0412764Z     @pytest.mark.wheel
2022-03-28T21:58:50.0413379Z     def test_proj_data_wheel():
2022-03-28T21:58:50.0413943Z         """Get GDAL data path from a wheel"""
2022-03-28T21:58:50.0414681Z >       assert PROJDataFinder().search() == os.path.join(os.path.dirname(fiona.__file__), 'proj_data')
2022-03-28T21:58:50.0415511Z E       AssertionError: assert None == 'D:\\bld\\fiona_1648502623372\\_test_env\\lib\\site-packages\\fiona\\proj_data'
2022-03-28T21:58:50.0416431Z E        +  where None = <bound method PROJDataFinder.search of <fiona._env.PROJDataFinder object at 0x000001EBD0D10548>>()
2022-03-28T21:58:50.0417480Z E        +    where <bound method PROJDataFinder.search of <fiona._env.PROJDataFinder object at 0x000001EBD0D10548>> = <fiona._env.PROJDataFinder object at 0x000001EBD0D10548>.search
2022-03-28T21:58:50.0420676Z E        +      where <fiona._env.PROJDataFinder object at 0x000001EBD0D10548> = PROJDataFinder()
2022-03-28T21:58:50.0426578Z E        +  and   'D:\\bld\\fiona_1648502623372\\_test_env\\lib\\site-packages\\fiona\\proj_data' = <function join at 0x000001EBCCBC8F78>('D:\\bld\\fiona_1648502623372\\_test_env\\lib\\site-packages\\fiona', 'proj_data')
2022-03-28T21:58:50.0427966Z E        +    where <function join at 0x000001EBCCBC8F78> = <module 'ntpath' from 'D:\\bld\\fiona_1648502623372\\_test_env\\lib\\ntpath.py'>.join
2022-03-28T21:58:50.0428847Z E        +      where <module 'ntpath' from 'D:\\bld\\fiona_1648502623372\\_test_env\\lib\\ntpath.py'> = os.path
2022-03-28T21:58:50.0429902Z E        +    and   'D:\\bld\\fiona_1648502623372\\_test_env\\lib\\site-packages\\fiona' = <function dirname at 0x000001EBCCBCA288>('D:\\bld\\fiona_1648502623372\\_test_env\\lib\\site-packages\\fiona\\__init__.py')
2022-03-28T21:58:50.0431930Z E        +      where <function dirname at 0x000001EBCCBCA288> = <module 'ntpath' from 'D:\\bld\\fiona_1648502623372\\_test_env\\lib\\ntpath.py'>.dirname
2022-03-28T21:58:50.0434278Z E        +        where <module 'ntpath' from 'D:\\bld\\fiona_1648502623372\\_test_env\\lib\\ntpath.py'> = os.path
2022-03-28T21:58:50.0435856Z E        +      and   'D:\\bld\\fiona_1648502623372\\_test_env\\lib\\site-packages\\fiona\\__init__.py' = fiona.__file__
2022-03-28T21:58:50.0436876Z 
2022-03-28T21:58:50.0437526Z tests\test_data_paths.py:22: AssertionError
2022-03-28T21:58:50.0439683Z __________________________ test_env_gdal_data_wheel ___________________________
2022-03-28T21:58:50.0440171Z 
2022-03-28T21:58:50.0441222Z     @pytest.mark.wheel
2022-03-28T21:58:50.0442480Z     def test_env_gdal_data_wheel():
2022-03-28T21:58:50.0448200Z         runner = CliRunner()
2022-03-28T21:58:50.0449675Z         result = runner.invoke(main_group, ['env', '--gdal-data'])
2022-03-28T21:58:50.0451016Z         assert result.exit_code == 0
2022-03-28T21:58:50.0452065Z >       assert result.output.strip() == os.path.join(os.path.dirname(fiona.__file__), 'gdal_data')
2022-03-28T21:58:50.0452841Z E       AssertionError: assert 'D:\\bld\\fio...\\share\\gdal' == 'D:\\bld\\fio...na\\gdal_data'
2022-03-28T21:58:50.0453429Z E         - %PREFIX%\lib\site-packages\fiona\gdal_data
2022-03-28T21:58:50.0454006Z E         ?                                      ^    ^^ ---------------     -----
2022-03-28T21:58:50.0454534Z E         + %PREFIX%\Library\share\gdal
2022-03-28T21:58:50.0454992Z E         ?                                      ^  ++++  ^^^
2022-03-28T21:58:50.0455305Z 
2022-03-28T21:58:50.0455768Z tests\test_data_paths.py:30: AssertionError
2022-03-28T21:58:50.0456412Z __________________________ test_env_proj_data_wheel ___________________________
2022-03-28T21:58:50.0456839Z 
2022-03-28T21:58:50.0457294Z     @pytest.mark.wheel
2022-03-28T21:58:50.0457788Z     def test_env_proj_data_wheel():
2022-03-28T21:58:50.0462152Z         runner = CliRunner()
2022-03-28T21:58:50.0462723Z         result = runner.invoke(main_group, ['env', '--proj-data'])
2022-03-28T21:58:50.0463289Z         assert result.exit_code == 0
2022-03-28T21:58:50.0463868Z >       assert result.output.strip() == os.path.join(os.path.dirname(fiona.__file__), 'proj_data')
2022-03-28T21:58:50.0464578Z E       AssertionError: assert 'D:\\bld\\fio...\\share\\proj' == 'D:\\bld\\fio...na\\proj_data'
2022-03-28T21:58:50.0465201Z E         - %PREFIX%\lib\site-packages\fiona\proj_data
2022-03-28T21:58:50.0465709Z E         ?                                      ^    ^^ ---------------     -----
2022-03-28T21:58:50.0466231Z E         + %PREFIX%\Library\share\proj
2022-03-28T21:58:50.0466688Z E         ?                                      ^  ++++  ^^^
2022-03-28T21:58:50.0467001Z 
2022-03-28T21:58:50.0467398Z tests\test_data_paths.py:38: AssertionError

@akrherz
Copy link
Contributor Author

akrherz commented Mar 29, 2022

No change, these test failures are all pytest.mark.wheel, hmmm

@jorisvandenbossche
Copy link
Member

@akrherz thanks for taking a look at this!

I think those failing tests marked with pytest.mark.wheel can be skipped, because it are tests that are only valid for testing a package that was installed as a wheel (it is testing that it did find the gdal and proj data that are included in the wheel, while for conda those will be found in the conda environment's shared data)

@jorisvandenbossche
Copy link
Member

But, it's a bit strange that we don't see the errors that were reported in #192 (or discomforting, because that would mean that a green build here doesn't necessarily mean that it will be fixed)

@akrherz
Copy link
Contributor Author

akrherz commented Mar 29, 2022

Totally agreed, it must be some strange combination of installed packages and perhaps their import order at play here. Hopefully some benevolent windows-savoy user can figure this out, I have little expertise on windows :(

@akrherz akrherz closed this Mar 29, 2022
@akrherz akrherz deleted the gh192_enable_windows_tests branch March 29, 2022 13:21
@jorisvandenbossche
Copy link
Member

See my explanation at #192 (comment), which explains why the tests are passing here.

Would you like to reopen the PR? (it's worth to get the tests working anyway)

@akrherz
Copy link
Contributor Author

akrherz commented Mar 30, 2022

@jorisvandenbossche , I didn't have the tests working though as it appears the way we are building fiona on windows is "wheel-ish" ?

@jorisvandenbossche
Copy link
Member

Yes, but as mentioned above, we should simply skip those tests, as they are only meant to be working when running from a wheel installation (so it's expected that those tests fail in conda's case, they also fail locally for me)

@akrherz
Copy link
Contributor Author

akrherz commented Apr 1, 2022

I think that is my point @jorisvandenbossche , these failing tests are marked as pytest.mark.wheel, so the fact that they are not currently being skipped is a sign of troubles with our build.

@jorisvandenbossche
Copy link
Member

It's only a pytest mark, and not skipped automatically, so we will have to manually skip those (if the pytest marks work, you can normally do -m "not wheel", but not sure that will work in this case)

@akrherz akrherz mentioned this pull request Apr 1, 2022
4 tasks
@akrherz
Copy link
Contributor Author

akrherz commented Apr 1, 2022

The github UI did not permit me to reopen this PR, so made #195 now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants