python-threadpoolctl/python_executable.patch
Tomáš Chvátal f6bfeb9289 Accepting request 822626 from home:mcalabkova:branches:devel:languages:python
- update to 2.1.0
  * New commandline interface: 'python -m threadpoolctl -i numpy'
    will try to import the `numpy` package and then return the output of
    `threadpoolctl.threadpool_info()` on STDOUT formatted using the JSON
    syntax. This makes it easier to quickly introspect a Python environment.
- Add patch python_executable.patch

OBS-URL: https://build.opensuse.org/request/show/822626
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-threadpoolctl?expand=0&rev=3
2020-07-24 14:06:42 +00:00

31 lines
1.2 KiB
Diff

Index: threadpoolctl-2.1.0/tests/test_threadpoolctl.py
===================================================================
--- threadpoolctl-2.1.0.orig/tests/test_threadpoolctl.py
+++ threadpoolctl-2.1.0/tests/test_threadpoolctl.py
@@ -396,14 +396,14 @@ def test_libomp_libiomp_warning(recwarn)
def test_command_line_empty():
output = subprocess.check_output(
- "python -m threadpoolctl".split())
+ (sys.executable + " -m threadpoolctl").split())
assert json.loads(output.decode("utf-8")) == []
def test_command_line_command_flag():
pytest.importorskip("numpy")
output = subprocess.check_output(
- ["python", "-m", "threadpoolctl", "-c", "import numpy"])
+ [sys.executable, "-m", "threadpoolctl", "-c", "import numpy"])
cli_info = json.loads(output.decode("utf-8"))
this_process_info = threadpool_info()
@@ -415,7 +415,7 @@ def test_command_line_command_flag():
reason="need recent subprocess.run options")
def test_command_line_import_flag():
result = subprocess.run([
- "python", "-m", "threadpoolctl", "-i",
+ sys.executable, "-m", "threadpoolctl", "-i",
"numpy",
"scipy.linalg",
"invalid_package",