@pytest.mark.skipif(str(not IS_WINDOWS))
@pytest.mark.parametrize('colors,light_bg', [
    (True, False),
    (True, True),
    (False, False),
    (None, False),
])
def test_windows_screenshot(colors, light_bg):
    screenshot = PROJECT_ROOT.join('image.png')
    if screenshot.check():
        screenshot.remove()
    command = [sys.executable, str(PROJECT_ROOT.join('example.py')), 'print', '-w', str(screenshot)]

    # Set options.
    if colors is True:
        command.append('--colors')
    elif colors is False:
        command.append('--no-colors')

    # Setup expected.
    if colors is False:
        candidates = PROJECT_ROOT.join('tests').listdir('sub_sans_*.bmp')
        expected_count = 27
    elif light_bg:
        candidates = PROJECT_ROOT.join('tests').listdir('sub_dark_fg_*.bmp')
        expected_count = 2
    else:
        candidates = PROJECT_ROOT.join('tests').listdir('sub_light_fg_*.bmp')
        expected_count = 2
    assert candidates

    # Run.
    with RunNewConsole(command, white_bg=light_bg) as pos:
        box = next(pos)
        assert screenshot_until_match(str(screenshot), 15, [str(p) for p in candidates], expected_count, box)
Installs reaver, pixiewps and other stuff
dataset/ETHPy150Open Robpol86/colorclass/tests/test_example.py/test_windows_screenshot--crossover with--dataset/ETHPy150Open jgilhutton/pyxiewps_WPShack-Python/pyxiewps-EN.py/Config.get_binaries