From f676c50ba91ca6d4d0da9f77aeadc8b3fb16dc26 Mon Sep 17 00:00:00 2001 From: Eddy Pedroni Date: Sat, 9 Nov 2024 23:22:55 +0100 Subject: CLI improvements --- cli-project/test/solo_tool_cli_integrationtest.py | 41 ---------------------- cli-project/test/test.flac | Bin 31743252 -> 0 bytes cli-project/test/test.mp3 | Bin 5389533 -> 0 bytes cli-project/test/test_session.json | 13 ------- 4 files changed, 54 deletions(-) delete mode 100644 cli-project/test/solo_tool_cli_integrationtest.py delete mode 100644 cli-project/test/test.flac delete mode 100644 cli-project/test/test.mp3 delete mode 100644 cli-project/test/test_session.json (limited to 'cli-project/test') 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 - diff --git a/cli-project/test/test.flac b/cli-project/test/test.flac deleted file mode 100644 index 9164735..0000000 Binary files a/cli-project/test/test.flac and /dev/null differ diff --git a/cli-project/test/test.mp3 b/cli-project/test/test.mp3 deleted file mode 100644 index 3c353b7..0000000 Binary files a/cli-project/test/test.mp3 and /dev/null differ diff --git a/cli-project/test/test_session.json b/cli-project/test/test_session.json deleted file mode 100644 index f48b792..0000000 --- a/cli-project/test/test_session.json +++ /dev/null @@ -1,13 +0,0 @@ -[ - { - "path" : "test.flac", - "ab_limits" : null - }, - { - "path" : "test.mp3", - "ab_limits" : [ - [0.1, 0.2], - [0.3, 0.4] - ] - } -] -- cgit v1.2.3