()
| 5697 | |
| 5698 | |
| 5699 | def test_nbytes_auto(): |
| 5700 | chunks = normalize_chunks("800B", shape=(500,), dtype="float64") |
| 5701 | assert chunks == ((100, 100, 100, 100, 100),) |
| 5702 | chunks = normalize_chunks("200B", shape=(10, 10), dtype="float64") |
| 5703 | assert chunks == ((5, 5), (5, 5)) |
| 5704 | chunks = normalize_chunks((5, "200B"), shape=(10, 10), dtype="float64") |
| 5705 | assert chunks == ((5, 5), (5, 5)) |
| 5706 | chunks = normalize_chunks("33B", shape=(10, 10), dtype="float64") |
| 5707 | assert chunks == ((2, 2, 2, 2, 2), (2, 2, 2, 2, 2)) |
| 5708 | chunks = normalize_chunks("1800B", shape=(10, 20, 30), dtype="float64") |
| 5709 | assert chunks == ((6, 4), (6, 6, 6, 2), (6, 6, 6, 6, 6)) |
| 5710 | |
| 5711 | with pytest.raises(ValueError): |
| 5712 | normalize_chunks("10B", shape=(10,), limit=20, dtype="float64") |
| 5713 | with pytest.raises(ValueError): |
| 5714 | normalize_chunks("100B", shape=(10, 10), limit=20, dtype="float64") |
| 5715 | with pytest.raises(ValueError): |
| 5716 | normalize_chunks(("100B", "10B"), shape=(10, 10), dtype="float64") |
| 5717 | with pytest.raises(ValueError): |
| 5718 | normalize_chunks(("10B", "10B"), shape=(10, 10), limit=20, dtype="float64") |
| 5719 | |
| 5720 | |
| 5721 | def test_auto_chunks(): |
nothing calls this directly
no test coverage detected