* Split ``--source`` by lines instead of by characters (#536). * Enable full toml configuration and pyproject.toml (#534). * Support for Python 3.5 has been dropped (#510). * Add flag to disable `# noqa` comment processing in API (#485). * Methods, Functions and Nested functions that have a docstring now throw D418 (#511). * Methods decorated with @overload no longer reported as D102 (#511). * Functions and nested functions decorated with @overload no longer reported as D103 (#511). * Treat "package" as an imperative verb for D401 (#356). * Fix the parsing of decorated one line functions (#499). * Methods, Functions and Nested functions that have a docstring now throw D418 (#511). * Methods decorated with @overload no longer reported as D102. * Functions and nested functions decorated with @overload no longer reported as D103. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydocstyle?expand=0&rev=21
31 lines
1.3 KiB
Diff
31 lines
1.3 KiB
Diff
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(-)
|
|
|
|
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:
|
|
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),
|
|
- posix=False)
|
|
+ cmd = shlex.split(
|
|
+ ('"{}" -m {} {} {}' if sys.platform == "nt" else '{} -m {} {} {}')
|
|
+ .format(sys.executable, self.script_name, run_target, args),
|
|
+ posix=False)
|
|
p = subprocess.Popen(cmd,
|
|
stdout=subprocess.PIPE,
|
|
stderr=subprocess.PIPE)
|