Browse Source

Fix a test that does not pass when stdin is closed

Matthew Wang 8 years ago
parent
commit
bd099f3a87
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      tests/test_cdiff.py

+ 3
- 1
tests/test_cdiff.py View File

@@ -753,7 +753,9 @@ class MainTest(unittest.TestCase):
753 753
         os.chdir(self._non_ws)
754 754
         ret = cdiff.main()
755 755
         os.chdir(self._cwd)
756
-        self.assertNotEqual(ret, 0)
756
+        # Travis now runs tests with stdin closed
757
+        if sys.stdin.isatty():
758
+            self.assertNotEqual(ret, 0)
757 759
 
758 760
     def test_read_log(self):
759 761
         sys.argv = [sys.argv[0], '--log']