MCPcopy Index your code
hub / github.com/python/cpython / test_list_members

Method test_list_members

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

Source from the content-addressed store, hash-verified

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