MCPcopy
hub / github.com/tornadoweb/tornado / test_repr

Method test_repr

tornado/test/locks_test.py:248–256  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

246 self.assertRaises(ValueError, locks.Semaphore, value=-1)
247
248 def test_repr(self):
249 sem = locks.Semaphore()
250 self.assertIn("Semaphore", repr(sem))
251 self.assertIn("unlocked,value:1", repr(sem))
252 sem.acquire()
253 self.assertIn("locked", repr(sem))
254 self.assertNotIn("waiters", repr(sem))
255 sem.acquire()
256 self.assertIn("waiters", repr(sem))
257
258 def test_acquire(self):
259 sem = locks.Semaphore()

Callers

nothing calls this directly

Calls 1

acquireMethod · 0.95

Tested by

no test coverage detected