def test_nfold(self):
        n_trials = 50
        n_blocks = 5
        xv = scot.xvschema.make_nfold(n_blocks)(n_trials)
        for n, (train, test) in enumerate(xv):
            self.assertEqual(len(test), n_trials // n_blocks)
            self.assertEqual(len(train), n_trials - n_trials // n_blocks)

            for t in train:
                self.assertTrue(t not in test)
        self.assertEqual(n + 1, n_blocks)
dataset/ETHPy150Open scot-dev/scot/scot/tests/test_xvschema.py/TestBuiltin.test_nfold/original