コード例 #1
0
ファイル: test_statistics.py プロジェクト: tobyndax/GageRnR
    def test_stdShape(self):
        g = Statistics(data)
        std = g.calculateStd()

        self.assertEqual(std[Component.TOTAL].size, 1)
        self.assertEqual(std[Component.OPERATOR].shape, (3, ))
        self.assertEqual(std[Component.PART].shape, (5, ))
コード例 #2
0
ファイル: test_statistics.py プロジェクト: tobyndax/GageRnR
    def test_meanShape(self):
        g = Statistics(data)
        mean = g.calculateMean()

        self.assertEqual(mean[Component.TOTAL].size, 1)
        self.assertEqual(mean[Component.OPERATOR].shape, (3, ))
        self.assertEqual(mean[Component.PART].shape, (5, ))
コード例 #3
0
 def test_meanLabels(self):
     s = Statistics(data, {
         "Operator": ["A", "B", "C]"],
         "Part": ["O", "P", "Q", "R", "S"]
     })
     s.calculate()
     self.assertTrue(True)
コード例 #4
0
ファイル: test_statistics.py プロジェクト: tobyndax/GageRnR
    def test_summaryRaise(self):
        g = Statistics(data)
        mean = g.calculateMean()

        meanPart0 = np.mean(data[:, 0, :])
        meanOperator0 = np.mean(data[0, :, :])
        self.assertAlmostEqual(meanOperator0, mean[Component.OPERATOR][0])
        self.assertAlmostEqual(meanPart0, mean[Component.PART][0])
コード例 #5
0
ファイル: test_statistics.py プロジェクト: tobyndax/GageRnR
    def test_std(self):
        g = Statistics(data)
        std = g.calculateStd()

        stdPart0 = np.std(data[:, 0, :], ddof=1)
        stdOperator0 = np.std(data[0, :, :], ddof=1)
        self.assertEqual(stdOperator0, std[Component.OPERATOR][0])
        self.assertEqual(stdPart0, std[Component.PART][0])
コード例 #6
0
ファイル: test_statistics.py プロジェクト: tobyndax/GageRnR
 def test_summary(self):
     s = Statistics(data)
     s.calculate()
     s.summary()
     self.assertTrue(True)
コード例 #7
0
ファイル: test_statistics.py プロジェクト: tobyndax/GageRnR
 def test_summaryException(self):
     s = Statistics(data)
     self.assertRaises(Exception, s.summary)
コード例 #8
0
ファイル: test_statistics.py プロジェクト: tobyndax/GageRnR
 def test_strAfterCalculated(self):
     s = Statistics(data)
     s.calculate()
     s.__str__()
     self.assertTrue(True)
コード例 #9
0
ファイル: test_statistics.py プロジェクト: tobyndax/GageRnR
 def test_str(self):
     s = Statistics(data)
     s.__str__()
     self.assertTrue(True)