示例#1
0
class TestParser(unittest.TestCase):
    def setUp(self):
        self.stream = io.StringIO()
        self.parser = Parser(stream=self.stream)

    def test_print_message_default_file(self):
        self.parser._print_message('foobar')
        self.assertEqual(self.stream.getvalue(), 'foobar')
示例#2
0
class TestParser(unittest.TestCase):

    def setUp(self):
        self.stream = io.StringIO()
        self.parser = Parser(stream=self.stream)

    def test_print_message_default_file(self):
        self.parser._print_message('foobar')
        self.assertEqual(self.stream.getvalue(), 'foobar')
示例#3
0
 def setUp(self):
     self.stream = io.StringIO()
     self.parser = Parser(stream=self.stream)
示例#4
0
 def setUp(self):
     self.stream = io.StringIO()
     self.parser = Parser(stream=self.stream)