From f3bfa1cff793440f2792271440ac3bab781361df Mon Sep 17 00:00:00 2001 From: Eric Snow Date: Tue, 10 Apr 2018 22:41:07 +0000 Subject: [PATCH] Add Workspace.write_python_script(). --- tests/helpers/workspace.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/helpers/workspace.py b/tests/helpers/workspace.py index 6e2209c5..eeabe2e8 100644 --- a/tests/helpers/workspace.py +++ b/tests/helpers/workspace.py @@ -45,6 +45,9 @@ class Workspace(object): def write_script(self, *path, **kwargs): return self._write_script(path, **kwargs) + def write_python_script(self, *path, **kwargs): + return self._write_script(path, executable=sys.executable, **kwargs) + def lockfile(self, filename, timeout=1.0): _timeout = timeout filename = self.resolve(filename)