2019-09-16 07:34:48 +00:00
|
|
|
From 9379ef5b73a8a07a6e8c95185db33b849a9d015f Mon Sep 17 00:00:00 2001
|
|
|
|
From: John Vandenberg <jayvdb@gmail.com>
|
|
|
|
Date: Sun, 15 Sep 2019 14:13:44 +0700
|
|
|
|
Subject: [PATCH] test_integration: Use sys.executable
|
|
|
|
|
|
|
|
Literal `python` is often `python2` and may not be present at all.
|
|
|
|
|
|
|
|
Closes https://github.com/PyCQA/pydocstyle/issues/177
|
|
|
|
---
|
|
|
|
src/tests/test_integration.py | 9 +++++----
|
|
|
|
1 file changed, 5 insertions(+), 4 deletions(-)
|
|
|
|
|
2022-03-26 18:59:42 +00:00
|
|
|
Index: pydocstyle-6.1.1/src/tests/test_integration.py
|
|
|
|
===================================================================
|
|
|
|
--- pydocstyle-6.1.1.orig/src/tests/test_integration.py
|
|
|
|
+++ pydocstyle-6.1.1/src/tests/test_integration.py
|
|
|
|
@@ -99,9 +99,10 @@ class SandboxEnv:
|
2019-03-05 09:59:08 +00:00
|
|
|
run_target = self.tempdir if target is None else \
|
|
|
|
os.path.join(self.tempdir, target)
|
|
|
|
|
|
|
|
- cmd = shlex.split("{} {} {}"
|
|
|
|
- .format(self.script_name, run_target, args),
|
2019-09-16 07:34:48 +00:00
|
|
|
- posix=False)
|
|
|
|
+ cmd = shlex.split(
|
|
|
|
+ ('"{}" -m {} {} {}' if sys.platform == "nt" else '{} -m {} {} {}')
|
|
|
|
+ .format(sys.executable, self.script_name, run_target, args),
|
|
|
|
+ posix=False)
|
2019-03-05 09:59:08 +00:00
|
|
|
p = subprocess.Popen(cmd,
|
|
|
|
stdout=subprocess.PIPE,
|
2019-09-16 07:34:48 +00:00
|
|
|
stderr=subprocess.PIPE)
|