[pypy-commit] pypy default: Fix test, and improve it to check that a non-executable fake exe is not

arigo noreply at buildbot.pypy.org
Tue Sep 2 20:33:58 CEST 2014


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r73283:912dd9df99a8
Date: 2014-09-02 20:33 +0200
http://bitbucket.org/pypy/pypy/changeset/912dd9df99a8/

Log:	Fix test, and improve it to check that a non-executable fake exe is
	not picked up any more, but an executable one is (after issue
	#1856).

diff --git a/pypy/interpreter/test/test_app_main.py b/pypy/interpreter/test/test_app_main.py
--- a/pypy/interpreter/test/test_app_main.py
+++ b/pypy/interpreter/test/test_app_main.py
@@ -985,6 +985,11 @@
             assert sys.path == old_sys_path + [self.goal_dir]
 
             app_main.setup_bootstrap_path(self.fake_exe)
+            assert sys.executable == ''      # not executable!
+            assert sys.path == old_sys_path + [self.goal_dir]
+
+            os.chmod(self.fake_exe, 0755)
+            app_main.setup_bootstrap_path(self.fake_exe)
             assert sys.executable == self.fake_exe
             assert self.goal_dir not in sys.path
 


More information about the pypy-commit mailing list