Tests that frozen policies can't be changed.
(self)
| 42 | self.assertEqual(p2.shard_dimension, 23) |
| 43 | |
| 44 | def testFrozen(self): |
| 45 | """Tests that frozen policies can't be changed.""" |
| 46 | p1 = tpu_sharding.ShardingPolicy() |
| 47 | p1.freeze() |
| 48 | with self.assertRaises(ValueError): |
| 49 | p1.set_number_of_shards(17) |
| 50 | with self.assertRaises(ValueError): |
| 51 | p1.set_shard_dimension(22) |
| 52 | |
| 53 | def testStr(self): |
| 54 | """Tests the string representation.""" |
nothing calls this directly
no test coverage detected