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

Method test_unpickable

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

Source from the content-addressed store, hash-verified

4819 scandir_iter.close()
4820
4821 def test_unpickable(self):
4822 filename = self.create_file("file.txt")
4823 scandir_iter = os.scandir(self.path)
4824 import pickle
4825 self.assertRaises(TypeError, pickle.dumps, scandir_iter, filename)
4826 scandir_iter.close()
4827
4828 def check_entry(self, entry, name, is_dir, is_file, is_symlink):
4829 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