Skip to content

Commit

Permalink
Remove timing information from the PTY output check
Browse files Browse the repository at this point in the history
  • Loading branch information
koterpillar committed Nov 23, 2017
1 parent 10e9330 commit a5766ad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/integration/calculator.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ nose.config: INFO: Ignoring files matching ['^\\.', '^_', '^setup\\.py$']
 那么结果应该是80(B

----------------------------------------------------------------------
Ran 1 test in 0.001s
Ran 1 test in XXXXs

OK
4 changes: 4 additions & 0 deletions tests/integration/test_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from __future__ import absolute_import

import os
import re
import subprocess
import sys
import unittest
Expand Down Expand Up @@ -48,6 +49,9 @@ def test_success_zh(self):

self.assertEqual(exitcode, 0, "Feature run successfully.")

# Remove timing information from the output as unstable
out = re.sub(b'in [0-9.]+s', b'in XXXXs', out)

with open(os.path.join(TEST_PATH, 'calculator.txt'), 'rb') as expected:
expected_out = expected.read()
self.assertEqual(out, expected_out, "Output matches expected.")
Expand Down

0 comments on commit a5766ad

Please sign in to comment.