

def testGraphicRendition(self):
    self.term.selectGraphicRendition(BOLD, UNDERLINE, BLINK, REVERSE_VIDEO)
    self.term.write('W')
    self.term.selectGraphicRendition(NORMAL)
    self.term.write('X')
    self.term.selectGraphicRendition(BLINK)
    self.term.write('Y')
    self.term.selectGraphicRendition(BOLD)
    self.term.write('Z')
    ch = self.term.getCharacter(0, 0)
    self.assertEqual(ch[0], 'W')
    self.failUnless(ch[1].bold)
    self.failUnless(ch[1].underline)
    self.failUnless(ch[1].blink)
    self.failUnless(ch[1].reverseVideo)
    ch = self.term.getCharacter(1, 0)
    self.assertEqual(ch[0], 'X')
    self.failIf(ch[1].bold)
    self.failIf(ch[1].underline)
    self.failIf(ch[1].blink)
    self.failIf(ch[1].reverseVideo)
    ch = self.term.getCharacter(2, 0)
    self.assertEqual(ch[0], 'Y')
    self.failUnless(ch[1].blink)
    self.failIf(ch[1].bold)
    self.failIf(ch[1].underline)
    self.failIf(ch[1].reverseVideo)
    ch = self.term.getCharacter(3, 0)
    self.assertEqual(ch[0], 'Z')
    self.failUnless(ch[1].blink)
    self.failUnless(ch[1].bold)
    self.failIf(ch[1].underline)
    self.failIf(ch[1].reverseVideo)

dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/conch/test/test_helper.py BufferTestCase.testGraphicRendition/original