Skip to content

Commit

Permalink
Tests: Make test_option_w_ignore verify 'warnings' get imported.
Browse files Browse the repository at this point in the history
Closes #3402.
  • Loading branch information
mnencia authored and htgoebel committed Mar 21, 2018
1 parent 83b8f45 commit 6036de0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/functional/test_basic.py
Expand Up @@ -282,7 +282,8 @@ def test_option_w_unset(pyi_builder):
assert 'ignore' not in sys.warnoptions
""")

def test_option_w_ignore(pyi_builder, monkeypatch):

def test_option_w_ignore(pyi_builder, monkeypatch, capsys):
"Test to ensure that option W can be set."

def MyEXE(*args, **kwargs):
Expand All @@ -300,6 +301,8 @@ def MyEXE(*args, **kwargs):
assert 'ignore' in sys.warnoptions
""")

_, err = capsys.readouterr()
assert "'import warnings' failed" not in err

@skipif_win
def test_python_makefile(pyi_builder):
Expand Down

0 comments on commit 6036de0

Please sign in to comment.