Skip to content

Commit

Permalink
Fix test for Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
weilycoder committed Dec 5, 2024
1 parent 0126b61 commit 99d3cc8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cyaron/tests/io_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,11 @@ def test_output_gen_time_limit_exceeded(self):
[
"import time\n",
"from multiprocessing.shared_memory import SharedMemory\n",
"shm = SharedMemory(input())\n",
"shm_name = input()\n"
"time.sleep(0.5)\n",
"shm.buf[0] = 0xff",
"shm = SharedMemory(shm_name)\n",
"shm.buf[0] = 0xff\n",
"shm.close()\n"
]
)

Expand All @@ -97,6 +99,7 @@ def test_output_gen_time_limit_exceeded(self):
time.sleep(0.5)
self.assertEqual(shm.buf[0], 0x00)
shm.close()
shm.unlink()

def test_output_gen_time_limit_not_exceeded(self):
with captured_output() as (out, err):
Expand Down

0 comments on commit 99d3cc8

Please sign in to comment.