Exemplo n.º 1
0
    def testDirectCallArgs(self):
        colors.blue("This is")

        if not hasattr(sys.stdout, "getvalue"):
            self.fail("Need to run in buffered mode!")

        output = sys.stdout.getvalue().strip()
        self.assertEquals(output, str(colors.blue | "This is"))
Exemplo n.º 2
0
    def testDirectCallArgs(self):
        colors.blue("This is")

        if not hasattr(sys.stdout, "getvalue"):
            self.fail("Need to run in buffered mode!")

        output = sys.stdout.getvalue().strip()
        self.assertEquals(output,str(colors.blue | "This is"))
Exemplo n.º 3
0
 def testDirectCall(self, capsys):
     colors.blue()
     assert capsys.readouterr()[0] == str(colors.blue)
Exemplo n.º 4
0
 def testDirectCall(self, capsys):
     colors.blue()
     assert capsys.readouterr()[0] == str(colors.blue)