Example #1
0
 def test_hello_world(self):
     main.main(xreadlines("print 'hello world'"), 
             overrides={'outfile':self.outString, 'outtype':'rst',
                         'quiet':True, 'noecho':True }),
     self.assertEqual(self.outString.getvalue(),
         ".. header:: Compiled with pyreport\n\n\n::\n\n    print 'hello world'\n    \n\n.. class:: answer\n\n  ::\n\n    hello world\n    \n    \n\n")
Example #2
0
 def test_empty_file(self):
     main.main(xreadlines(""), 
             overrides={'outfile':self.outString, 'outtype':'rst',
                         'quiet':True}),
     self.assertEqual(self.outString.getvalue(),
             '.. header:: Compiled with pyreport\n\n\n\n')