コード例 #1
0
    def testSplitSuccessfulTrue(self):
        # First test dataset
        a = np.arange(220).reshape(10, 22)
        time, Runs = define_xydata(a, 1)
        result = type(time) == type(a)
        self.assertTrue(result)

        # Second test dataset
        time1, Runs1 = define_xydata(a, 6)
        result2 = type(time) == type(a)
        self.assertTrue(result2)
コード例 #2
0
 def testCorrectSplitsFalse(self):
     a = np.arange(210).reshape(10, 21)
     result = define_xydata(a, 1)
     self.assertFalse(result[3])
コード例 #3
0
 def testJustRightSetsFalse(self):
     a = np.arange(220).reshape(10, 22)
     result = define_xydata(a, 7)
     self.assertFalse(result[2])
コード例 #4
0
 def testWholeNumberFalse(self):
     a = np.arange(220).reshape(10, 22)
     result = define_xydata(a, 1.5)
     self.assertFalse(result[1])