stdpy: Add missing threading.ThreadError

This commit is contained in:
rdb 2020-12-30 22:56:26 +01:00
parent 2ce373b0da
commit c141bef19b
2 changed files with 9 additions and 0 deletions

View File

@ -34,6 +34,7 @@ __all__ = [
'Semaphore', 'BoundedSemaphore', 'Semaphore', 'BoundedSemaphore',
'Event', 'Event',
'Timer', 'Timer',
'ThreadError',
'local', 'local',
'current_thread', 'current_thread',
'main_thread', 'main_thread',
@ -46,6 +47,7 @@ TIMEOUT_MAX = _thread.TIMEOUT_MAX
local = _thread._local local = _thread._local
_newname = _thread._newname _newname = _thread._newname
ThreadError = _thread.error
class ThreadBase: class ThreadBase:
""" A base class for both Thread and ExternalThread in this """ A base class for both Thread and ExternalThread in this

View File

@ -0,0 +1,7 @@
from direct.stdpy import threading
import pytest
def test_threading_error():
with pytest.raises(threading.ThreadError):
threading.stack_size()