Skip to content

Commit

Permalink
Testing: Mark a couple of tests as flaky
Browse files Browse the repository at this point in the history
Those tests started to fail failing frequently in Python 3.11
  • Loading branch information
ccordoba12 committed May 5, 2024
1 parent a5a2954 commit c581cd3
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 c581cd3

Please sign in to comment.