forked from rc/aircox
Feat: packaging (#127)
- Add configuration files for packaging - Precommit now uses ruff Co-authored-by: bkfox <thomas bkfox net> Reviewed-on: rc/aircox#127
This commit is contained in:
@ -38,12 +38,8 @@ sox_values = {
|
||||
|
||||
@pytest.fixture
|
||||
def sox_interfaces():
|
||||
process = Interface(
|
||||
None, {"communicate": ("", sox_output.encode("utf-8"))}
|
||||
)
|
||||
subprocess = Interface.inject(
|
||||
sound_stats, "subprocess", {"Popen": lambda *_, **__: process}
|
||||
)
|
||||
process = Interface(None, {"communicate": ("", sox_output.encode("utf-8"))})
|
||||
subprocess = Interface.inject(sound_stats, "subprocess", {"Popen": lambda *_, **__: process})
|
||||
yield {"process": process, "subprocess": subprocess}
|
||||
subprocess._irelease()
|
||||
|
||||
@ -110,9 +106,7 @@ class TestSoundStats:
|
||||
|
||||
def test_check(self, stats):
|
||||
good = [{"val": i} for i in range(0, 11)]
|
||||
bad = [{"val": i} for i in range(-10, 0)] + [
|
||||
{"val": i} for i in range(11, 20)
|
||||
]
|
||||
bad = [{"val": i} for i in range(-10, 0)] + [{"val": i} for i in range(11, 20)]
|
||||
stats.stats = good + bad
|
||||
calls = {}
|
||||
stats.resume = lambda *_: calls.setdefault("resume", True)
|
||||
|
Reference in New Issue
Block a user