Skip to content

Commit

Permalink
Merge pull request #604 from ccordoba12/flaky-test
Browse files Browse the repository at this point in the history
Mark a couple of tests as flaky
  • Loading branch information
ccordoba12 authored May 5, 2024
2 parents a5a2954 + c581cd3 commit d298874
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions qtconsole/tests/test_comms.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import time
from queue import Empty

import unittest

from flaky import flaky

from qtconsole.manager import QtKernelManager


Expand All @@ -29,7 +30,6 @@ def setUp(self):
self._get_next_msg()
self._get_next_msg()


def tearDown(self):
"""Close the kernel."""
if self.kernel_manager:
Expand All @@ -51,6 +51,7 @@ def _get_next_msg(self, timeout=10):
pass
return msg

@flaky(max_runs=10)
def test_kernel_to_frontend(self):
"""Communicate from the kernel to the frontend."""
comm_manager = self.comm_manager
Expand Down Expand Up @@ -104,6 +105,7 @@ def comm_message(self, msg):
msg = self._get_next_msg()
assert msg['header']['msg_type'] == 'stream'

@flaky(max_runs=10)
def test_frontend_to_kernel(self):
"""Communicate from the frontend to the kernel."""
comm_manager = self.comm_manager
Expand Down Expand Up @@ -144,5 +146,6 @@ def test_frontend_to_kernel(self):
assert msg['msg_type'] == 'stream'
assert msg['content']['text'] == 'close\n'


if __name__ == "__main__":
unittest.main()

0 comments on commit d298874

Please sign in to comment.