mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-08-06 16:53:38 +02:00
Drop out crappy tests, and improve quality overall
This commit is contained in:
@@ -130,17 +130,6 @@ class TestPollingPause:
|
||||
# Now unpaused - all contexts exited
|
||||
assert not is_polling_paused()
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_triple_nested_pause(self):
|
||||
"""Three levels of nesting work correctly."""
|
||||
async with pause_polling():
|
||||
async with pause_polling():
|
||||
async with pause_polling():
|
||||
assert is_polling_paused()
|
||||
assert is_polling_paused()
|
||||
assert is_polling_paused()
|
||||
assert not is_polling_paused()
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_pause_resumes_on_exception(self):
|
||||
"""Polling resumes even if exception occurs in context."""
|
||||
@@ -171,23 +160,6 @@ class TestPollingPause:
|
||||
# All contexts exited
|
||||
assert not is_polling_paused()
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_counter_increments_and_decrements(self):
|
||||
"""Counter correctly tracks pause depth."""
|
||||
import app.radio_sync as radio_sync
|
||||
|
||||
assert radio_sync._polling_pause_count == 0
|
||||
|
||||
async with pause_polling():
|
||||
assert radio_sync._polling_pause_count == 1
|
||||
|
||||
async with pause_polling():
|
||||
assert radio_sync._polling_pause_count == 2
|
||||
|
||||
assert radio_sync._polling_pause_count == 1
|
||||
|
||||
assert radio_sync._polling_pause_count == 0
|
||||
|
||||
|
||||
class TestSyncRadioTime:
|
||||
"""Test the radio time sync function."""
|
||||
|
||||
Reference in New Issue
Block a user