]> granicus.if.org Git - python/commitdiff
fix test for subprocess (#16644)
authorAndrew Svetlov <andrew.svetlov@gmail.com>
Wed, 26 Dec 2012 21:34:54 +0000 (23:34 +0200)
committerAndrew Svetlov <andrew.svetlov@gmail.com>
Wed, 26 Dec 2012 21:34:54 +0000 (23:34 +0200)
1  2 
Lib/test/test_subprocess.py

index b0cd63c8f2508eab17c25f5b9bb2222282028514,75eb852cc97f7ad1b36bc25149921f6ab5ea42a3..63fa9a7d9a62461681f4b90ac71127f68f926b8c
@@@ -2154,15 -2017,14 +2154,12 @@@ class ContextManagerTests(BaseTestCase)
              self.assertEqual(proc.returncode, 1)
  
      def test_invalid_args(self):
--        with self.assertRaises(EnvironmentError) as c:
++        with self.assertRaises(FileNotFoundError) as c:
              with subprocess.Popen(['nonexisting_i_hope'],
                                    stdout=subprocess.PIPE,
                                    stderr=subprocess.PIPE) as proc:
                  pass
  
-             if c.exception.errno != errno.ENOENT:  # ignore "no such file"
-                 raise c.exception
 -        self.assertEqual(c.exception.errno, errno.ENOENT)
--
  
  def test_main():
      unit_tests = (ProcessTestCase,