Skip to content

Commit

Permalink
Merge pull request #143 from pyiron/thread_test
Browse files Browse the repository at this point in the history
Add test for raising thread
  • Loading branch information
jan-janssen authored Jul 30, 2023
2 parents 58ea588 + 2672481 commit 8cf7c24
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/test_thread.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import unittest
from pympipool.shared.thread import RaisingThread


def raise_error():
raise ValueError


class TestRaisingThread(unittest.TestCase):
def test_raising_thread(self):
with self.assertRaises(ValueError):
process = RaisingThread(target=raise_error)
process.start()
process.join()

0 comments on commit 8cf7c24

Please sign in to comment.