(self)
| 560 | cls.invalid_init_values = [(-1,)] |
| 561 | |
| 562 | def test_legacy_pickle(self): |
| 563 | # Pickling format was changed in 2.0.x |
| 564 | import gzip |
| 565 | import pickle |
| 566 | |
| 567 | expected_state = np.array( |
| 568 | [ |
| 569 | 9957867060933711493, |
| 570 | 532597980065565856, |
| 571 | 14769588338631205282, |
| 572 | 13 |
| 573 | ], |
| 574 | dtype=np.uint64 |
| 575 | ) |
| 576 | |
| 577 | base_path = os.path.split(os.path.abspath(__file__))[0] |
| 578 | pkl_file = os.path.join(base_path, "data", "sfc64_np126.pkl.gz") |
| 579 | with gzip.open(pkl_file) as gz: |
| 580 | sfc = pickle.load(gz) |
| 581 | |
| 582 | assert isinstance(sfc, SFC64) |
| 583 | assert_equal(sfc.state["state"]["state"], expected_state) |
| 584 | |
| 585 | |
| 586 | class TestDefaultRNG: |
nothing calls this directly
no test coverage detected