コード例 #1
0
 def check(self, testinput, testoutput):
     args       = rewrite_pydoc.parse_cmdline(['-f', testinput, '-o', 'ignored'])
     fname      = rewrite_pydoc.get_input_file_name(args)
     contents   = rewrite_pydoc.read_file_contents(fname)
     rewritten  = rewrite_pydoc.rewrite(contents, '../../../../docs/src/common-text',
                                        '../../../../docs/src/graphics', False)
     expected   = open(testoutput, 'r').read()
     self.assertEqual(rewritten, expected)
コード例 #2
0
ファイル: test_rewrite.py プロジェクト: skeating/libsbml_test
 def check(self, testinput, testoutput):
     args       = rewrite_pydoc.parse_cmdline(['-f', testinput, '-o', 'ignored'])
     fname      = rewrite_pydoc.get_input_file_name(args)
     contents   = rewrite_pydoc.read_file_contents(fname)
     rewritten  = rewrite_pydoc.rewrite(contents, '../../../../docs/src/common-text',
                                        '../../../../docs/src/common-graphics', False)
     expected   = open(testoutput, 'r').read()
     self.assertEqual(rewritten, expected)
コード例 #3
0
ファイル: test_read.py プロジェクト: Valentine-11/sbml2matlab
 def test_file_read(self):
     args = rewrite_pydoc.parse_cmdline(
         ['-f', 'test/data/001.i', '-o', 'ignored.bar'])
     fname = rewrite_pydoc.get_input_file_name(args)
     contents = rewrite_pydoc.read_file_contents(fname)
     self.assertEqual(contents, 'The contents.\n')
コード例 #4
0
ファイル: test_read.py プロジェクト: 0u812/libsbml.js.frozen
 def test_file_read(self):
     args  = rewrite_pydoc.parse_cmdline(['-f', 'test/data/001.i', '-o', 'ignored.bar'])
     fname = rewrite_pydoc.get_input_file_name(args)
     contents = rewrite_pydoc.read_file_contents(fname)
     self.assertEqual(contents, 'The contents.\n')