[Python-modules-commits] [python-psutil] 05/12: pass PYTHONPATH to the test runner
Ondřej Nový
onovy at moszumanska.debian.org
Sun Dec 11 17:25:31 UTC 2016
This is an automated email from the git hooks/post-receive script.
onovy pushed a commit to branch master
in repository python-psutil.
commit 071c1a174f9e9f89d6048e9e377fd4a068e89dc6
Author: Sandro Tosi <morph at debian.org>
Date: Sun Apr 10 13:17:47 2016 +0100
pass PYTHONPATH to the test runner
---
Makefile | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/Makefile b/Makefile
index 29fc528..3b53ae8 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,7 @@
# You can set the variables below from the command line.
PYTHON = python
+PYTHONPATH = .
TSCRIPT = psutil/tests/runner.py
ARGS =
@@ -117,36 +118,36 @@ setup-dev-env: install-git-hooks install-pip
# Run all tests.
test:
- $(PYTHON) $(TSCRIPT)
+ PYTHONPATH=$(PYTHONPATH) $(PYTHON) $(TSCRIPT)
# Test psutil process-related APIs.
test-process:
- $(PYTHON) -m unittest -v psutil.tests.test_process
+ PYTHONPATH=$(PYTHONPATH) $(PYTHON) -m unittest -v psutil.tests.test_process
# Test psutil system-related APIs.
test-system:
- $(PYTHON) -m unittest -v psutil.tests.test_system
+ PYTHONPATH=$(PYTHONPATH) $(PYTHON) -m unittest -v psutil.tests.test_system
# Test misc.
test-misc:
- $(PYTHON) psutil/tests/test_misc.py
+ PYTHONPATH=$(PYTHONPATH) $(PYTHON) psutil/tests/test_misc.py
# Test POSIX.
test-posix:
- $(PYTHON) psutil/tests/test_posix.py
+ PYTHONPATH=$(PYTHONPATH) $(PYTHON) psutil/tests/test_posix.py
# Test memory leaks.
test-memleaks:
- $(PYTHON) psutil/tests/test_memory_leaks.py
+ PYTHONPATH=$(PYTHONPATH) $(PYTHON) psutil/tests/test_memory_leaks.py
# Run specific platform tests only.
test-platform:
- $(PYTHON) psutil/tests/test_`$(PYTHON) -c 'import psutil; print([x.lower() for x in ("LINUX", "BSD", "OSX", "SUNOS", "WINDOWS") if getattr(psutil, x)][0])'`.py
+ PYTHONPATH=$(PYTHONPATH) $(PYTHON) psutil/tests/test_`$(PYTHON) -c 'import psutil; print([x.lower() for x in ("LINUX", "BSD", "OSX", "SUNOS", "WINDOWS") if getattr(psutil, x)][0])'`.py
# Run a specific test by name, e.g.
# make test-by-name psutil.tests.test_system.TestSystemAPIs.test_cpu_times
test-by-name:
- @$(PYTHON) -m unittest -v $(ARGS)
+ PYTHONPATH=$(PYTHONPATH) @$(PYTHON) -m unittest -v $(ARGS)
coverage: install
# Note: coverage options are controlled by .coveragerc file
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-psutil.git
More information about the Python-modules-commits
mailing list