def testRandomPermutationSequenceRepeat(self):
    with self.session() as sess:
        out = py_x_ops.random_permutation_sequence(num=20, batch=7, repeat=True)
        remaining = list(range(20))
        for _ in range(10):
            vals = ((sess.run(out).tolist() + sess.run(out).tolist()) + sess.run(out).tolist())
            self.assertEqual(len(vals), 21)
            for x in remaining:
                vals.remove(x)
            self.assertEqual(len(vals), len(set(vals)))
            remaining = list((set(range(20)) - set(vals)))
def testRandomPermutationSequenceRepeat(self):
    with self.session() as sess:
        out = py_x_ops.random_permutation_sequence(num=20, batch=7, repeat=True)
        remaining = list(range(20))
        for _ in range(10):
            vals = ((sess.run(out).tolist() + sess.run(out).tolist()) + sess.run(out).tolist())
            self.assertEqual(len(vals), 21)
            for x in remaining:
                vals.remove(x)
            self.assertEqual(len(vals), len(set(vals)))
            remaining = list((set(range(20)) - set(vals)))