コード例 #1
0
    def testSysToNormalized(self):
        cl = Blob()
        cl.text = self.sys_text
        self.assertEqual(self.nor_text, cl.text)

        cl.text = self.win_text
        self.assertEqual(self.nor_text, cl.text)
コード例 #2
0
ファイル: blob_test.py プロジェクト: MordodeMaru/common
    def testSysToNormalized(self):
        cl = Blob()
        cl.text = self.sys_text
        self.assertEqual(self.nor_text, cl.text)

        cl.text = self.win_text
        self.assertEqual(self.nor_text, cl.text)
コード例 #3
0
ファイル: blob_test.py プロジェクト: MordodeMaru/common
    def testNormSetter(self):
        cl = Blob()
        c2 = Blob()
        cl.text = self.nor_text
        c2.text = self.sys_text
        self.assertEqual(cl, c2)

        c2.compressedBin = self.compressed
        self.assertEqual(cl, c2)
コード例 #4
0
    def testSysSetter(self):
        cl = Blob()
        c2 = Blob()
        cl.text = self.sys_text
        c2.text = self.nor_text
        self.assertEqual(cl, c2)

        c2.compressedBin = self.compressed
        self.assertEqual(cl, c2)
コード例 #5
0
ファイル: blob_test.py プロジェクト: MordodeMaru/common
    def testEqualsSameSetter(self):
        cl = Blob()
        c2 = Blob()
        cl.text = self.sys_text
        c2.text = self.nor_text
        self.assertEqual(cl, c2)

        cl.normalizedText = self.nor_text
        c2.normalizedText = self.nor_text
        self.assertEqual(cl, c2)

        cl.compressedBin = self.compressed
        c2.compressedBin = self.compressed
        self.assertEqual(cl, c2)
コード例 #6
0
    def testEqualsSameSetter(self):
        cl = Blob()
        c2 = Blob()
        cl.text = self.sys_text
        c2.text = self.nor_text
        self.assertEqual(cl, c2)

        cl.normalizedText = self.nor_text
        c2.normalizedText = self.nor_text
        self.assertEqual(cl, c2)

        cl.compressedBin = self.compressed
        c2.compressedBin = self.compressed
        self.assertEqual(cl, c2)
コード例 #7
0
ファイル: blob_test.py プロジェクト: MordodeMaru/common
 def testCompress(self):
     cl = Blob()
     cl.text = self.nor_text
     self.compressedBin = cl._compressed()
     self.assertEqual(self.nor_text, cl.text)
コード例 #8
0
ファイル: blob_test.py プロジェクト: MordodeMaru/common
 def testEncodeAndDecode(self):
     cl = Blob()
     cl.text = self.nor_text
     self.binary = cl.binary
     self.assertEqual(self.nor_text, cl.text)
コード例 #9
0
ファイル: blob_test.py プロジェクト: MordodeMaru/common
 def testSysTextNotModified(self):
     cl = Blob()
     cl.text = self.sys_text
     self.assertEqual(BlobUnitTest.sys_text, cl.load)
コード例 #10
0
ファイル: blob_test.py プロジェクト: MordodeMaru/common
 def test_similarity(self):
     cl = Blob()
     c2 = Blob()
     cl.text = self.nor_text
     c2.text = self.nor_text
     self.assertEquals(cl.similarity(c2), 1.0)
コード例 #11
0
 def testCompress(self):
     cl = Blob()
     cl.text = self.nor_text
     self.compressedBin = cl._compressed()
     self.assertEqual(self.nor_text, cl.text)
コード例 #12
0
 def testEncodeAndDecode(self):
     cl = Blob()
     cl.text = self.nor_text
     self.binary = cl.binary
     self.assertEqual(self.nor_text, cl.text)
コード例 #13
0
 def testSysTextNotModified(self):
     cl = Blob()
     cl.text = self.sys_text
     self.assertEqual(BlobUnitTest.sys_text, cl.load)
コード例 #14
0
 def test_similarity(self):
     cl = Blob()
     c2 = Blob()
     cl.text = self.nor_text
     c2.text = self.nor_text
     self.assertEquals(cl.similarity(c2), 1.0)