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

Method test_unpickable

Lib/test/test_os.py:5096–5101  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

5094 scandir_iter.close()
5095
5096 def test_unpickable(self):
5097 filename = self.create_file("file.txt")
5098 scandir_iter = os.scandir(self.path)
5099 import pickle
5100 self.assertRaises(TypeError, pickle.dumps, scandir_iter, filename)
5101 scandir_iter.close()
5102
5103 def check_entry(self, entry, name, is_dir, is_file, is_symlink):
5104 self.assertIsInstance(entry, os.DirEntry)

Callers

nothing calls this directly

Calls 4

create_fileMethod · 0.95
scandirMethod · 0.45
assertRaisesMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected