mirror of
https://github.com/panda3d/panda3d.git
synced 2025-12-21 14:39:50 -06:00
tests: fix mutex test on win32 where mutexes are always reentrant
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user