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

Method test_bytes

Lib/test/test_pathlib/test_pathlib.py:320–343  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

318 self._check_str(os.fspath(p), ('a/b',))
319
320 def test_bytes(self):
321 P = self.cls
322 with self.assertRaises(TypeError):
323 P(b'a')
324 with self.assertRaises(TypeError):
325 P(b'a', 'b')
326 with self.assertRaises(TypeError):
327 P('a', b'b')
328 with self.assertRaises(TypeError):
329 P('a').joinpath(b'b')
330 with self.assertRaises(TypeError):
331 P('a') / b'b'
332 with self.assertRaises(TypeError):
333 b'a' / P('b')
334 with self.assertRaises(TypeError):
335 P('a').match(b'b')
336 with self.assertRaises(TypeError):
337 P('a').relative_to(b'b')
338 with self.assertRaises(TypeError):
339 P('a').with_name(b'b')
340 with self.assertRaises(TypeError):
341 P('a').with_stem(b'b')
342 with self.assertRaises(TypeError):
343 P('a').with_suffix(b'b')
344
345 def test_bytes_exc_message(self):
346 P = self.cls

Callers

nothing calls this directly

Calls 8

PClass · 0.70
assertRaisesMethod · 0.45
joinpathMethod · 0.45
matchMethod · 0.45
relative_toMethod · 0.45
with_nameMethod · 0.45
with_stemMethod · 0.45
with_suffixMethod · 0.45

Tested by

no test coverage detected