import tensorflow as tf

class JoinTimeSeriesTest(tf.test.TestCase):
    def runTest(self):
        members = set(dir(self.__class__)) - set(dir(tf.test.TestCase))
        members.remove('runTest')
        rList = []
        for mem in members:
            rList.append(eval('self.' + mem + '()'))
        return rList
    def joinTest(self):
        ts1 = tf.constant([[0,1], [1, 2], [2,5]])
        ts2 = tf.constant([[1,3], [3, 8] ])
        ts3 = tf.constant([ [0,1], [1,2], [2,3], [3,5], [5,8] ])
        ts1 = tf.cast(ts1, tf.int64)
        ts2 = tf.cast(ts2, tf.int64)
        ts3 = tf.cast(ts3, tf.int64)
        result = tf.user_ops.join_time_series([ts1, ts2])
        eqs= tf.equal(result, ts3)
        isEqual = tf.reduce_all(eqs)
        with tf.Session() as sess:
            print sess.run(isEqual)



if __name__ == "__main__":
    test = JoinTimeSeriesTest()
    testList = test.runTest()
