(self)
| 190 | self.assertEqual(out1, out2) |
| 191 | |
| 192 | def test_func_globals(self): |
| 193 | class Unpicklable: |
| 194 | def __reduce__(self): |
| 195 | raise Exception("not picklable") |
| 196 | |
| 197 | global exit |
| 198 | exit = Unpicklable() |
| 199 | |
| 200 | self.assertRaises( |
| 201 | Exception, lambda: cloudpickle.dumps(exit, protocol=self.protocol) |
| 202 | ) |
| 203 | |
| 204 | def foo(): |
| 205 | sys.exit(0) |
| 206 | |
| 207 | self.assertTrue("exit" in foo.__code__.co_names) |
| 208 | cloudpickle.dumps(foo) |
| 209 | |
| 210 | def test_memoryview(self): |
| 211 | buffer_obj = memoryview(b"Hello") |
nothing calls this directly
no test coverage detected