コード例 #1
0
 def test_gen50_output(self, capsys):
     filename = 'gen50'
     data_in = 'data/projects/keyboard/{}.in'.format(filename)
     spell_check(data_in)
     out, err = capsys.readouterr()
     with open(
             'tests/projects/keyboard/{}.out'.format(filename)) as file_out:
         expected_output = ''.join(file_out.readlines())
     assert expected_output == out
コード例 #2
0
 def test_gen26_time(self, capsys):
     filename = 'gen26'
     data_in = 'data/projects/keyboard/{}.in'.format(filename)
     start = time.time()
     spell_check(data_in)
     out, err = capsys.readouterr()
     stop = time.time()
     elapsed = stop - start
     assert elapsed < 2