Skip to content

TST: Disable exception capture for pytest-qt#7578

Merged
pllim merged 1 commit intoastropy:masterfrom
pllim:fix-logging-test
Jun 19, 2018
Merged

TST: Disable exception capture for pytest-qt#7578
pllim merged 1 commit intoastropy:masterfrom
pllim:fix-logging-test

Conversation

@pllim
Copy link
Copy Markdown
Member

@pllim pllim commented Jun 19, 2018

Fix #7572

This solution works for me with and without pytest-qt (2.4.1) installed.
ref: http://pytest-qt.readthedocs.io/en/1.4.0/virtual_methods.html (at the bottom)

p.s. Please remilestone if you don't need to backport this one.

@astropy-bot
Copy link
Copy Markdown

astropy-bot bot commented Jun 19, 2018

Hi there @pllim 👋 - thanks for the pull request! I'm just a friendly 🤖 that checks for issues related to the changelog and making sure that this pull request is milestoned and labeled correctly. This is mainly intended for the maintainers, so if you are not a maintainer you can ignore this, and a maintainer will let you know if any action is required on your part 😃.

Everything looks good from my point of view! 👍

If there are any issues with this message, please report them here.

Copy link
Copy Markdown
Member

@astrofrog astrofrog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me!

@pllim pllim added the zzz 💤 merge-when-ci-passes Do not use: We have auto-merge option now. label Jun 19, 2018
@pllim pllim merged commit dcf6a0d into astropy:master Jun 19, 2018
@pllim pllim deleted the fix-logging-test branch June 19, 2018 17:45
bsipocz pushed a commit that referenced this pull request Jun 22, 2018
TST: Disable exception capture for pytest-qt
bsipocz pushed a commit that referenced this pull request Jun 22, 2018
TST: Disable exception capture for pytest-qt
bsipocz pushed a commit that referenced this pull request Jun 22, 2018
TST: Disable exception capture for pytest-qt
@pllim
Copy link
Copy Markdown
Member Author

pllim commented Jul 28, 2020

This patch emits the following warning with pytest 6.0.0:

=============================== warnings summary ===============================
.../_pytest/config/__init__.py:1148
  .../_pytest/config/__init__.py:1148: PytestConfigWarning: Unknown config ini key: qt_no_exception_capture
  
    self._warn_or_fail_if_strict("Unknown config ini key: {}\n".format(key))
-- Docs: https://docs.pytest.org/en/stable/warnings.html

I don't think it will cause CI failure but not sure until we fix scientific-python/pytest-doctestplus#118 (the other problem). Cannot seem to silence it using filter_warnings in setup.cfg. It is emitted from https://github.com/pytest-dev/pytest/blob/7b65b2337bbb639d9c9553a666e05d8c5f76db41/src/_pytest/config/__init__.py#L1148 using https://github.com/pytest-dev/pytest/blob/7b65b2337bbb639d9c9553a666e05d8c5f76db41/src/_pytest/warnings.py#L193 .

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Logger test failures when pytest-qt is installed

2 participants