mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 16:20:11 -04:00
tests: fix mutex test on win32 where mutexes are always reentrant
This commit is contained in:
parent
11ecd3af87
commit
1a94e65b17
@ -6,7 +6,7 @@ def test_mutex_acquire_release():
|
||||
m.acquire()
|
||||
|
||||
# Assert that the lock is truly held now
|
||||
assert not m.try_acquire()
|
||||
assert m.debug_is_locked()
|
||||
|
||||
# Release the lock
|
||||
m.release()
|
||||
@ -25,7 +25,7 @@ def test_mutex_try_acquire():
|
||||
assert m.try_acquire()
|
||||
|
||||
# Assert that the lock is truly held now
|
||||
assert not m.try_acquire()
|
||||
assert m.debug_is_locked()
|
||||
|
||||
# Clean up
|
||||
m.release()
|
||||
@ -45,9 +45,15 @@ def test_remutex_try_acquire():
|
||||
# Trying to acquire the lock should succeed
|
||||
assert m.try_acquire()
|
||||
|
||||
# Should report being locked
|
||||
assert m.debug_is_locked()
|
||||
|
||||
# Trying a second time should succeed
|
||||
assert m.try_acquire()
|
||||
|
||||
# Should still report being locked
|
||||
assert m.debug_is_locked()
|
||||
|
||||
# Clean up
|
||||
m.release()
|
||||
m.release()
|
||||
|
Loading…
x
Reference in New Issue
Block a user