def test_launch_from_config(subprocess_call_stub):
    with open(TEST_CONFIG_FILE, 'w') as f:
        f.write("""[VMs]
6521 = squeakfromconfig.exe
""")
    squeakvmlauncher.launch_squeak(SPUR_IMAGE_6521)
    assert subprocess_call_stub.cmdline == ["squeakfromconfig.exe", SPUR_IMAGE_6521]
def _test_interactive_chooser(subprocess_call_stub):
    squeakvmlauncher.launch_squeak(SPUR_IMAGE_6521)
def test_launch_from_gui(subprocess_call_stub, monkeypatch):
    monkeypatch.setattr(squeakvmlauncher, 'choose_with_gui', lambda v: r'squeakfromgui.exe')
    squeakvmlauncher.launch_squeak(SPUR_IMAGE_6521)
    assert subprocess_call_stub.cmdline == ["squeakfromgui.exe", SPUR_IMAGE_6521]