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

Make test_option_w_ignore verify 'warnings' get imported #3402

Closed
htgoebel opened this Issue Mar 13, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@htgoebel
Member

htgoebel commented Mar 13, 2018

This is a good issue for somebody with good knowledge of pytest.

We have tests/functional/test_basic.py::test_option_w_ignore, which sets the "W" option, shows the symptoms described in #3397, but passes (see below). The error was not detected since the executable returns rc 0.

We need to enhance this test-case to verify 'import warnings' failed is not contained in the output. My quick attempted to use pytests' 'capsys' failed since _run_executable() in conftest.py proxies stdout/stderr.

------- Build finshed, now running executable. -------
[17154] PyInstaller Bootloader 3.x
…
[17155] LOADER: Setting sys.argv
[17155] LOADER: setting sys._MEIPASS
[17155] LOADER: importing modules from CArchive
[17155] LOADER: extracted struct
[17155] LOADER: callfunction returned...
[17155] LOADER: extracted pyimod01_os_path
[17155] LOADER: callfunction returned...
[17155] LOADER: extracted pyimod02_archive
[17155] LOADER: callfunction returned...
[17155] LOADER: extracted pyimod03_importers
[17155] LOADER: callfunction returned...
[17155] LOADER: Installing PYZ archive with Python modules.
[17155] LOADER: PYZ archive: out00-PYZ.pyz
[17155] LOADER: Running pyiboot01_bootstrap.py
[17155] LOADER: Running test_option_w_ignore.py
[17155] LOADER: OK.
[17155] LOADER: Cleaning up Python interpreter.
ImportError: No module named 'warnings'
[17154] LOADER: Back to parent (RC: 0)
[17154] LOADER: Doing cleanup
[17154] LOADER: Freeing archive status for …
------- Running executable finished. -------

mnencia added a commit to mnencia/pyinstaller that referenced this issue Mar 15, 2018

mnencia added a commit to mnencia/pyinstaller that referenced this issue Mar 15, 2018

mnencia added a commit to mnencia/pyinstaller that referenced this issue Mar 15, 2018

mnencia added a commit to mnencia/pyinstaller that referenced this issue Mar 15, 2018

Make test_option_w_ignore verify 'warnings' get imported
The test highlighted that also 'enum' module must be part of
base_library.zip to support Python 3.6

Closes: pyinstaller#3402

mnencia added a commit to mnencia/pyinstaller that referenced this issue Mar 15, 2018

mnencia added a commit to mnencia/pyinstaller that referenced this issue Mar 15, 2018

mnencia added a commit to mnencia/pyinstaller that referenced this issue Mar 16, 2018

@htgoebel htgoebel closed this in 6036de0 Mar 21, 2018

@htgoebel htgoebel added this to the PyInstaller 3.4 milestone Sep 2, 2018

cowo78 pushed a commit to cowo78/pyinstaller that referenced this issue Dec 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment