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

Method test_strip_bytearray

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

Source from the content-addressed store, hash-verified

866 self.assertEqual(list(it), data[1:])
867
868 def test_strip_bytearray(self):
869 self.assertEqual(self.type2test(b'abc').strip(memoryview(b'ac')), b'b')
870 self.assertEqual(self.type2test(b'abc').lstrip(memoryview(b'ac')), b'bc')
871 self.assertEqual(self.type2test(b'abc').rstrip(memoryview(b'ac')), b'ab')
872
873 def test_strip_string_error(self):
874 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