(self)
| 455 | reason="Skip numpy and scipy tests on PyPy", |
| 456 | ) |
| 457 | def test_ufunc(self): |
| 458 | # test a numpy ufunc (universal function), which is a C-based function |
| 459 | # that is applied on a numpy array |
| 460 | |
| 461 | if np: |
| 462 | # simple ufunc: np.add |
| 463 | self.assertEqual(pickle_depickle(np.add, protocol=self.protocol), np.add) |
| 464 | else: # skip if numpy is not available |
| 465 | pass |
| 466 | |
| 467 | if spp: |
| 468 | # custom ufunc: scipy.special.iv |
| 469 | self.assertEqual(pickle_depickle(spp.iv, protocol=self.protocol), spp.iv) |
| 470 | else: # skip if scipy is not available |
| 471 | pass |
| 472 | |
| 473 | def test_loads_namespace(self): |
| 474 | obj = 1, 2, 3, 4 |
nothing calls this directly
no test coverage detected