Skip to content

Commit 8cf7c24

Browse files
authored
Merge pull request #143 from pyiron/thread_test
Add test for raising thread
2 parents 58ea588 + 2672481 commit 8cf7c24

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/test_thread.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import unittest
2+
from pympipool.shared.thread import RaisingThread
3+
4+
5+
def raise_error():
6+
raise ValueError
7+
8+
9+
class TestRaisingThread(unittest.TestCase):
10+
def test_raising_thread(self):
11+
with self.assertRaises(ValueError):
12+
process = RaisingThread(target=raise_error)
13+
process.start()
14+
process.join()

0 commit comments

Comments
 (0)