| 504 | ri = self.check_from_spec('dev-train', [('dev-train', None, None)]) |
| 505 | |
| 506 | def test_add(self): |
| 507 | ri1 = splits.ReadInstruction.from_spec('train[10:20]') |
| 508 | ri2 = splits.ReadInstruction.from_spec('test[10:20]') |
| 509 | ri3 = splits.ReadInstruction.from_spec('train[1:5]') |
| 510 | ri = ri1 + ri2 + ri3 |
| 511 | self.assertEqual( |
| 512 | str(ri), |
| 513 | ( |
| 514 | "ReadInstruction('train[10:20]')" |
| 515 | "+ReadInstruction('test[10:20]')" |
| 516 | "+ReadInstruction('train[1:5]')" |
| 517 | ), |
| 518 | ) |
| 519 | |
| 520 | def test_invalid_rounding(self): |
| 521 | with self.assertRaisesWithPredicateMatch(ValueError, 'Rounding should be'): |