(self)
| 528 | self.assertEqual(out, 'it worked!') |
| 529 | |
| 530 | def test_in_thread(self): |
| 531 | script, file = _captured_script('print("it worked!", end="")') |
| 532 | with file: |
| 533 | def f(): |
| 534 | _interpreters.run_string(self.id, script) |
| 535 | |
| 536 | t = threading.Thread(target=f) |
| 537 | t.start() |
| 538 | t.join() |
| 539 | out = file.read() |
| 540 | |
| 541 | self.assertEqual(out, 'it worked!') |
| 542 | |
| 543 | def test_create_thread(self): |
| 544 | subinterp = _interpreters.create() |
nothing calls this directly
no test coverage detected