MCPcopy Create free account
hub / github.com/FastLED/FastLED / test_force_break

Method test_force_break

ci/tests/test_lock_database.py:291–298  ·  view source on GitHub ↗

Force break removes any lock regardless of PID status.

(self)

Source from the content-addressed store, hash-verified

289 shutil.rmtree(self.temp_dir, ignore_errors=True)
290
291 def test_force_break(self) -> None:
292 """Force break removes any lock regardless of PID status."""
293 pid = os.getpid()
294 self.db.try_acquire("force_lock", pid, "localhost", "op")
295
296 broken = self.db.force_break("force_lock")
297 self.assertTrue(broken)
298 self.assertFalse(self.db.is_held("force_lock"))
299
300
301class TestConcurrentThreads(unittest.TestCase):

Callers

nothing calls this directly

Calls 3

force_breakMethod · 0.80
is_heldMethod · 0.80
try_acquireMethod · 0.45

Tested by

no test coverage detected