MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_list_members

Method test_list_members

Lib/test/test_tarfile.py:370–380  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

368 (b'/123' * 125) + b'/longname', out)
369
370 def test_list_members(self):
371 tio = io.TextIOWrapper(io.BytesIO(), 'ascii', newline='\n')
372 def members(tar):
373 for tarinfo in tar.getmembers():
374 if 'reg' in tarinfo.name:
375 yield tarinfo
376 with support.swap_attr(sys, 'stdout', tio):
377 self.tar.list(verbose=False, members=members(self.tar))
378 out = tio.detach().getvalue()
379 self.assertIn(b'ustar/regtype', out)
380 self.assertNotIn(b'ustar/conttype', out)
381
382
383class GzipListTest(GzipTest, ListTest):

Callers

nothing calls this directly

Calls 5

detachMethod · 0.95
assertInMethod · 0.80
assertNotInMethod · 0.80
listMethod · 0.45
getvalueMethod · 0.45

Tested by

no test coverage detected