Explorar el Código

Fix a test that does not pass when stdin is closed

Matthew Wang hace 8 años
padre
commit
bd099f3a87
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3
    1
      tests/test_cdiff.py

+ 3
- 1
tests/test_cdiff.py Ver fichero

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