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

Method test_strip_bytearray

Lib/test/test_bytes.py:955–958  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

953 self.assertEqual(list(it), data[1:])
954
955 def test_strip_bytearray(self):
956 self.assertEqual(self.type2test(b'abc').strip(memoryview(b'ac')), b'b')
957 self.assertEqual(self.type2test(b'abc').lstrip(memoryview(b'ac')), b'bc')
958 self.assertEqual(self.type2test(b'abc').rstrip(memoryview(b'ac')), b'ab')
959
960 def test_strip_string_error(self):
961 self.assertRaises(TypeError, self.type2test(b'abc').strip, 'ac')

Callers

nothing calls this directly

Calls 5

type2testMethod · 0.80
assertEqualMethod · 0.45
stripMethod · 0.45
lstripMethod · 0.45
rstripMethod · 0.45

Tested by

no test coverage detected