(self)
| 1151 | assert not subprocess.call([sys.executable, "-c", command]) |
| 1152 | |
| 1153 | def test_import(self): |
| 1154 | # like test_multiprocess except subpackage modules referenced directly |
| 1155 | # (unlike test_submodule) |
| 1156 | global etree |
| 1157 | |
| 1158 | def scope(): |
| 1159 | import xml.etree as foobar |
| 1160 | |
| 1161 | def example(): |
| 1162 | _ = etree.Comment |
| 1163 | _ = foobar.ElementTree |
| 1164 | |
| 1165 | return example |
| 1166 | |
| 1167 | example = scope() |
| 1168 | import xml.etree.ElementTree as etree |
| 1169 | |
| 1170 | s = cloudpickle.dumps(example, protocol=self.protocol) |
| 1171 | |
| 1172 | command = ( |
| 1173 | "import base64; from pickle import loads; loads(base64.b32decode('" |
| 1174 | + base64.b32encode(s).decode("ascii") |
| 1175 | + "'))()" |
| 1176 | ) |
| 1177 | assert not subprocess.call([sys.executable, "-c", command]) |
| 1178 | |
| 1179 | def test_multiprocessing_lock_raises(self): |
| 1180 | lock = multiprocessing.Lock() |
nothing calls this directly
no outgoing calls
no test coverage detected