##// END OF EJS Templates
Add Path support to ipexec
Nikita Kniazev -
Show More
@@ -91,7 +91,7 b' class ProfileStartupTest(TestCase):'
91 f.write(test)
91 f.write(test)
92
92
93 def validate(self, output):
93 def validate(self, output):
94 tt.ipexec_validate(self.fname, output, '', options=self.options)
94 tt.ipexec_validate(self.fname, output, "", options=self.options)
95
95
96 def test_startup_py(self):
96 def test_startup_py(self):
97 self.init('00-start.py', 'zzz=123\n', 'print(zzz)\n')
97 self.init('00-start.py', 'zzz=123\n', 'print(zzz)\n')
@@ -177,7 +177,7 b' def ipexec(fname, options=None, commands=()):'
177
177
178 Parameters
178 Parameters
179 ----------
179 ----------
180 fname : str
180 fname : str, Path
181 Name of file to be executed (should have .py or .ipy extension).
181 Name of file to be executed (should have .py or .ipy extension).
182
182
183 options : optional, list
183 options : optional, list
@@ -200,6 +200,9 b' def ipexec(fname, options=None, commands=()):'
200 # Absolute path for filename
200 # Absolute path for filename
201 full_fname = os.path.join(test_dir, fname)
201 full_fname = os.path.join(test_dir, fname)
202 full_cmd = ipython_cmd + cmdargs + ['--', full_fname]
202 full_cmd = ipython_cmd + cmdargs + ['--', full_fname]
203 if sys.platform == "win32" and sys.version_info < (3, 8):
204 # subprocess.Popen does not support Path objects yet
205 full_cmd = list(map(str, full_cmd))
203 env = os.environ.copy()
206 env = os.environ.copy()
204 # FIXME: ignore all warnings in ipexec while we have shims
207 # FIXME: ignore all warnings in ipexec while we have shims
205 # should we keep suppressing warnings here, even after removing shims?
208 # should we keep suppressing warnings here, even after removing shims?
@@ -232,7 +235,7 b" def ipexec_validate(fname, expected_out, expected_err='',"
232
235
233 Parameters
236 Parameters
234 ----------
237 ----------
235 fname : str
238 fname : str, Path
236 Name of the file to be executed (should have .py or .ipy extension).
239 Name of the file to be executed (should have .py or .ipy extension).
237
240
238 expected_out : str
241 expected_out : str
General Comments 0
You need to be logged in to leave comments. Login now