def test_refresh_thread() -> None: class MockProgress: def __init__(self): self.count = 0 def refresh(self): self.count += 1 progress = MockProgress() thread = _RefreshThread(progress, 100) assert thread.progress == progress thread.start() sleep(0.2) thread.stop() assert progress.count >= 1
def test_refresh_thread() -> None: progress = Progress() thread = _RefreshThread(progress, 10) assert thread.progress == progress