diff options
author | Eddy Pedroni <epedroni@pm.me> | 2024-11-09 23:22:55 +0100 |
---|---|---|
committer | Eddy Pedroni <epedroni@pm.me> | 2024-11-09 23:22:55 +0100 |
commit | f676c50ba91ca6d4d0da9f77aeadc8b3fb16dc26 (patch) | |
tree | dd7cf29dff80610ec3e6179b444954a5bca3e125 /cli-project/test/solo_tool_cli_integrationtest.py | |
parent | cda8197669409689be291660f93cb288ab2d31b3 (diff) |
CLI improvements
Diffstat (limited to 'cli-project/test/solo_tool_cli_integrationtest.py')
-rw-r--r-- | cli-project/test/solo_tool_cli_integrationtest.py | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/cli-project/test/solo_tool_cli_integrationtest.py b/cli-project/test/solo_tool_cli_integrationtest.py deleted file mode 100644 index c29a223..0000000 --- a/cli-project/test/solo_tool_cli_integrationtest.py +++ /dev/null @@ -1,41 +0,0 @@ -import pytest -import io -from contextlib import redirect_stdout - -from solo_tool_cli import SoloToolCLI -from solo_tool import SoloTool - -class MockMidiController: - def __init__(self, soloTool): - self.connected = False - - def connect(self): - self.connected = True - -@pytest.fixture -def soloTool(): - return SoloTool() - -@pytest.fixture -def mockMidi(soloTool): - return MockMidiController(soloTool) - -@pytest.fixture -def uut(soloTool, mockMidi): - return SoloToolCLI("test_session.json", soloToolOverride=soloTool, midiOverride=mockMidi, tickEnable=False) - -def test_connectMidi(uut, mockMidi): - expectedOutput = """\ -Supported device: Novation Launchpad Mini MkII -Connecting to MIDI device... -""" - - with io.StringIO() as buf, redirect_stdout(buf): - uut.input("midi") - assert not mockMidi.connected - - uut.input("midi connect") - assert mockMidi.connected - - assert buf.getvalue() == expectedOutput - |