ソースを参照

Fix a test that does not pass when stdin is closed

Matthew Wang 8 年 前
コミット
bd099f3a87
共有1 個のファイルを変更した3 個の追加1 個の削除を含む
  1. 3
    1
      tests/test_cdiff.py

+ 3
- 1
tests/test_cdiff.py ファイルの表示

@@ -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']