def test_option_w_ignore(pyi_builder, monkeypatch):
 def MyEXE(*args, **kwargs):
  args = list(args)
  args.append([('W ignore', '', 'OPTION')])
  return EXE(*args, **kwargs)
 import PyInstaller
 EXE = PyInstaller.building.build_main.EXE
 monkeypatch.setattr('PyInstaller.building.build_main.EXE', MyEXE)
 pyi_builder.test_source("\n        import sys\n        assert 'ignore' in sys.warnoptions\n        ")

def test_option_w_ignore ( pyi_builder , monkeypatch ) : def MyEXE ( * args , ** kwargs ) : args = list ( args ) args . append ( [ ( 'W ignore' , '' , 'OPTION' ) ] ) return EXE ( * args , ** kwargs ) import PyInstaller EXE = PyInstaller . building . build_main . EXE monkeypatch . setattr ( 'PyInstaller.building.build_main.EXE' , MyEXE ) pyi_builder . test_source ( "\n        import sys\n        assert 'ignore' in sys.warnoptions\n        " )
test to ensure that option w can be set .