MCPcopy Create free account
hub / github.com/tensorflow/datasets / test_add

Method test_add

tensorflow_datasets/core/splits_test.py:506–518  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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'):

Callers

nothing calls this directly

Calls 1

from_specMethod · 0.45

Tested by

no test coverage detected