MCPcopy
hub / github.com/borgbackup/borg / test_limit

Method test_limit

src/borg/testsuite/helpers/datastruct_test.py:46–52  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

44 assert b4 is not b3 # New, smaller buffer.
45
46 def test_limit(self):
47 buffer = Buffer(bytearray, size=100, limit=200)
48 buffer.resize(200)
49 assert len(buffer) == 200
50 with pytest.raises(Buffer.MemoryLimitExceeded):
51 buffer.resize(201)
52 assert len(buffer) == 200
53
54 def test_get(self):
55 buffer = Buffer(bytearray, size=100, limit=200)

Callers

nothing calls this directly

Calls 2

resizeMethod · 0.95
BufferClass · 0.85

Tested by

no test coverage detected