def testRandomPermutationSequenceNoRepeat(self):
    with self.session() as sess:
        out = py_x_ops.random_permutation_sequence(num=20, batch=7, repeat=False)
        vals = ((sess.run(out).tolist() + sess.run(out).tolist()) + sess.run(out).tolist())
        self.assertEqual(list(range(20)), sorted(vals))
        with self.assertRaises(tf.errors.OutOfRangeError):
            sess.run(out)
def testRandomPermutationSequenceNoRepeat(self):
    with self.session() as sess:
        out = py_x_ops.random_permutation_sequence(num=20, batch=7, repeat=False)
        vals = ((sess.run(out).tolist() + sess.run(out).tolist()) + sess.run(out).tolist())
        self.assertEqual(list(range(20)), sorted(vals))
        with self.assertRaises(tf.errors.OutOfRangeError):
            sess.run(out)