Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(247)  |  Call(247)  |  Derive(0)  |  Import(0)
Fail if the two objects are unequal as determined by the '=='
operator.

src/m/w/mwlib.ext-0.13.2/upstream-src/tests/test_pdfbase_ttfonts.py   mwlib.ext(Download)
 
        ttf = FakeTTFontFile("\x81\x02\x03\x04" "\x85\x06" "ABCD" "\x7F\xFF" "\x80\x00" "\xFF\xFF")
        self.assertEquals(ttf.read_ulong(), 0x81020304L) # big-endian
        self.assertEquals(ttf._pos, 4)
        self.assertEquals(ttf.read_ushort(), 0x8506)
        self.assertEquals(ttf._pos, 6)
        self.assertEquals(ttf.read_tag(), 'ABCD')

src/r/e/reportlab-3.1.8/tests/test_pdfbase_ttfonts.py   reportlab(Download)
 
        ttf = FakeTTFontFile(b"\x81\x02\x03\x04" b"\x85\x06" b"ABCD" b"\x7F\xFF" b"\x80\x00" b"\xFF\xFF")
        self.assertEquals(ttf.read_ulong(), 0x81020304) # big-endian
        self.assertEquals(ttf._pos, 4)
        self.assertEquals(ttf.read_ushort(), 0x8506)
        self.assertEquals(ttf._pos, 6)
        self.assertEquals(ttf.read_tag(), 'ABCD')

src/r/e/ReportLab-HEAD/tests/test_pdfbase_ttfonts.py   ReportLab(Download)
 
        ttf = FakeTTFontFile("\x81\x02\x03\x04" "\x85\x06" "ABCD" "\x7F\xFF" "\x80\x00" "\xFF\xFF")
        self.assertEquals(ttf.read_ulong(), 0x81020304L) # big-endian
        self.assertEquals(ttf._pos, 4)
        self.assertEquals(ttf.read_ushort(), 0x8506)
        self.assertEquals(ttf._pos, 6)
        self.assertEquals(ttf.read_tag(), 'ABCD')

src/m/w/mwlib.ext-0.13.2/upstream-src/tests/test_pdfbase_encodings.py   mwlib.ext(Download)
        # Courier are all 600 ems wide.  So if one 'measures as utf8' one will
        # get a wrong width as extra characters are seen
        self.assertEquals(len(testCp1252),52)
        self.assertNear(pdfmetrics.stringWidth(testCp1252, 'Courier', 10, 'cp1252'),312.0)
        # the test string has 5 more bytes and so "measures too long" if passed to
        # a single-byte font which treats it as a single-byte string.
        self.assertEquals(len(testUTF8),57)
        self.assertNear(pdfmetrics.stringWidth(testUTF8, 'Courier', 10),312.0)
 
        self.assertEquals(len(testUni),52)
 
        extracted = extractText(c.getCurrentPageContent())
        self.assertEquals(extracted[0], expectedCp1252)
        self.assertEquals(extracted[1], extracted[2])
        #self.assertEquals(subsetToUnicode(self.vera, extracted[1]), testUni)

src/r/e/reportlab-3.1.8/tests/test_pdfbase_encodings.py   reportlab(Download)
        # Courier are all 600 ems wide.  So if one 'measures as utf8' one will
        # get a wrong width as extra characters are seen
        self.assertEquals(len(testCp1252),52)
        self.assertNear(pdfmetrics.stringWidth(testCp1252, 'Courier', 10, 'cp1252'),312.0)
        # the test string has 5 more bytes and so "measures too long" if passed to
        # a single-byte font which treats it as a single-byte string.
        self.assertEquals(len(testUTF8),57)
        self.assertNear(pdfmetrics.stringWidth(testUTF8, 'Courier', 10),312.0)
 
        self.assertEquals(len(testUni),52)
 
        extracted = extractText(c.getCurrentPageContent())
        self.assertEquals(extracted[0], expectedCp1252)
        self.assertEquals(extracted[1], extracted[2])
        #self.assertEquals(subsetToUnicode(self.vera, extracted[1]), testUni)

src/r/e/reportlab-3.1.8/tests/test_pdfbase_pdfdoc.py   reportlab(Download)
    def testPDFText(self):
        self.assertEquals(pdfdoc.PDFText(b'Hello World').format(self.doc),b'<48656c6c6f20576f726c64>')
 
    def testPDFString(self):
        self.assertEquals(pdfdoc.PDFString(b'Hello World').format(self.doc),b'(Hello World)')
        self.assertEquals(pdfdoc.PDFString(b'Hello\xc2\xa2World',0).format(self.doc),b'(Hello\xa2World)')
        self.assertEquals(pdfdoc.PDFString(b'Hello\xc2\xa0World',0).format(self.doc),b'(\xfe\xff\x00H\x00e\x00l\x00l\x00o\x00\xa0\x00W\x00o\x00r\x00l\x00d)')
        self.assertEquals(pdfdoc.PDFString(b'Hello\xc2\xa0World',1).format(self.doc),b'(\\376\\377\\000H\\000e\\000l\\000l\\000o\\000\\240\\000W\\000o\\000r\\000l\\000d)')

src/r/e/ReportLab-HEAD/tests/test_pdfbase_encodings.py   ReportLab(Download)
        # Courier are all 600 ems wide.  So if one 'measures as utf8' one will
        # get a wrong width as extra characters are seen
        self.assertEquals(len(testCp1252),52)
        self.assertNear(pdfmetrics.stringWidth(testCp1252, 'Courier', 10, 'cp1252'),312.0)
        # the test string has 5 more bytes and so "measures too long" if passed to
        # a single-byte font which treats it as a single-byte string.
        self.assertEquals(len(testUTF8),57)
        self.assertNear(pdfmetrics.stringWidth(testUTF8, 'Courier', 10),312.0)
 
        self.assertEquals(len(testUni),52)
 
        extracted = extractText(c.getCurrentPageContent())
        self.assertEquals(extracted[0], expectedCp1252)
        self.assertEquals(extracted[1], extracted[2])
        #self.assertEquals(subsetToUnicode(self.vera, extracted[1]), testUni)

src/m/w/mwlib.ext-0.13.2/upstream-src/tests/test_pdfbase_pdfdoc.py   mwlib.ext(Download)
    def testPDFText(self):
        self.assertEquals(pdfdoc.PDFText('Hello World').format(self.doc),'<48656c6c6f20576f726c64>')
 
    def testPDFString(self):
        self.assertEquals(pdfdoc.PDFString('Hello World').format(self.doc),'(Hello World)')
        self.assertEquals(pdfdoc.PDFString('Hello\xc2\xa2World',0).format(self.doc),'(Hello\xa2World)')
        self.assertEquals(pdfdoc.PDFString('Hello\xc2\xa0World',0).format(self.doc),'(\xfe\xff\x00H\x00e\x00l\x00l\x00o\x00\xa0\x00W\x00o\x00r\x00l\x00d)')
        self.assertEquals(pdfdoc.PDFString('Hello\xc2\xa0World',1).format(self.doc),'(\\376\\377\\000H\\000e\\000l\\000l\\000o\\000\\240\\000W\\000o\\000r\\000l\\000d)')

src/r/e/ReportLab-HEAD/tests/test_pdfbase_pdfdoc.py   ReportLab(Download)
    def testPDFText(self):
        self.assertEquals(pdfdoc.PDFText('Hello World').format(self.doc),'<48656c6c6f20576f726c64>')
 
    def testPDFString(self):
        self.assertEquals(pdfdoc.PDFString('Hello World').format(self.doc),'(Hello World)')
        self.assertEquals(pdfdoc.PDFString('Hello\xc2\xa2World',0).format(self.doc),'(Hello\xa2World)')
        self.assertEquals(pdfdoc.PDFString('Hello\xc2\xa0World',0).format(self.doc),'(\xfe\xff\x00H\x00e\x00l\x00l\x00o\x00\xa0\x00W\x00o\x00r\x00l\x00d)')
        self.assertEquals(pdfdoc.PDFString('Hello\xc2\xa0World',1).format(self.doc),'(\\376\\377\\000H\\000e\\000l\\000l\\000o\\000\\240\\000W\\000o\\000r\\000l\\000d)')