MCPcopy Create free account
hub / github.com/McCloudS/subgen / TestPut

Class TestPut

tests/test_queue.py:25–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23
24
25class TestPut:
26 def test_new_item_returns_true(self, q):
27 assert q.put(_task("/a/b.mkv")) is True
28
29 def test_duplicate_while_queued_returns_false(self, q):
30 q.put(_task("/a/b.mkv"))
31 assert q.put(_task("/a/b.mkv")) is False
32
33 def test_different_paths_both_accepted(self, q):
34 assert q.put(_task("/a/b.mkv")) is True
35 assert q.put(_task("/a/c.mkv")) is True
36
37 def test_duplicate_while_processing_returns_false(self, q):
38 q.put(_task("/a/b.mkv"))
39 q.get() # moves to _processing
40 assert q.put(_task("/a/b.mkv")) is False
41
42
43class TestPriority:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected