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

test_ast_parser_handles_exceptions fails on PyInstaller master & develop branches #279

Open
jayvdb opened this issue Nov 13, 2020 · 0 comments

Comments

@jayvdb
Copy link
Contributor

jayvdb commented Nov 13, 2020

test_ast_parser_handles_exceptions added in #227 depends on https://github.com/pyinstaller/pyinstaller/blob/6d4cce1f8eb80c0bf49d35876d28daa55a05800f/setup.py , and fails on master and develop branches of PyInstaller.

>       assert "altgraph" in result["install_requires"]
E       KeyError: 'install_requires'

c.f. https://github.com/pyinstaller/pyinstaller/blob/master/setup.py#L75

result for the current develop branch looks like {'setup_requires': ['setuptools >= 39.2.0'], 'cmdclass': {'build_bootloader': 'build_bootloader', 'build': 'MyBuild'}}

It is easy to update the test logic to work with an updated git submodule link, e.g. change the assert to

assert "setuptools >= 39.2.0" in result["setup_requires"]

but that may not exercise the intended code, and it is also brittle. An assert on cmdclass seems like it will be more stable.

If there was something specific about the old setup.py, that the new setup.py doesnt include , it would be good to extract out of the old pyinstaller a smaller testcase to prevent regressions.

Noting that #268 recommends removing the ast parsing used here. It might be helpful to copy the stripped down test case to be a PEP 517 test case.

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

No branches or pull requests

1 participant