[Python-modules-commits] [python-psutil] 08/14: pass PYTHONPATH to the test runner
Sandro Tosi
morph at moszumanska.debian.org
Sun Nov 26 01:56:10 UTC 2017
This is an automated email from the git hooks/post-receive script.
morph pushed a commit to branch master
in repository python-psutil.
commit af75554b4f7a1a27b812613c29bc65c205d5d995
Author: Sandro Tosi <morph at debian.org>
Date: Sun Apr 10 13:17:47 2016 +0100
pass PYTHONPATH to the test runner
---
Makefile | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/Makefile b/Makefile
index 0529894..ac6ce40 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/__main__.py
ARGS =
# List of nice-to-have dev libs.
@@ -107,42 +108,42 @@ setup-dev-env: ## Install GIT hooks, pip, test deps (also upgrades them).
# ===================================================================
test: ## Run all tests.
- PSUTIL_TESTING=1 PYTHONWARNINGS=all $(PYTHON) $(TSCRIPT)
+ PYTHONPATH=$(PYTHONPATH) PSUTIL_TESTING=1 PYTHONWARNINGS=all $(PYTHON) $(TSCRIPT)
test-process: ## Run process-related API tests.
- PSUTIL_TESTING=1 PYTHONWARNINGS=all $(PYTHON) -m unittest -v psutil.tests.test_process
+ PYTHONPATH=$(PYTHONPATH) PSUTIL_TESTING=1 PYTHONWARNINGS=all $(PYTHON) -m unittest -v psutil.tests.test_process
test-system: ## Run system-related API tests.
- PSUTIL_TESTING=1 PYTHONWARNINGS=all $(PYTHON) -m unittest -v psutil.tests.test_system
+ PYTHONPATH=$(PYTHONPATH) PSUTIL_TESTING=1 PYTHONWARNINGS=all $(PYTHON) -m unittest -v psutil.tests.test_system
test-misc: ## Run miscellaneous tests.
- PSUTIL_TESTING=1 PYTHONWARNINGS=all $(PYTHON) psutil/tests/test_misc.py
+ PYTHONPATH=$(PYTHONPATH) PSUTIL_TESTING=1 PYTHONWARNINGS=all $(PYTHON) psutil/tests/test_misc.py
test-unicode: ## Test APIs dealing with strings.
- PSUTIL_TESTING=1 PYTHONWARNINGS=all $(PYTHON) psutil/tests/test_unicode.py
+ PYTHONPATH=$(PYTHONPATH) PSUTIL_TESTING=1 PYTHONWARNINGS=all $(PYTHON) psutil/tests/test_unicode.py
test-contracts: ## APIs sanity tests.
- PSUTIL_TESTING=1 PYTHONWARNINGS=all $(PYTHON) psutil/tests/test_contracts.py
+ PYTHONPATH=$(PYTHONPATH) PSUTIL_TESTING=1 PYTHONWARNINGS=all $(PYTHON) psutil/tests/test_contracts.py
test-connections: ## Test net_connections() and Process.connections().
- PSUTIL_TESTING=1 PYTHONWARNINGS=all $(PYTHON) psutil/tests/test_connections.py
+ PYTHONPATH=$(PYTHONPATH) PSUTIL_TESTING=1 PYTHONWARNINGS=all $(PYTHON) psutil/tests/test_connections.py
test-posix: ## POSIX specific tests.
- PSUTIL_TESTING=1 PYTHONWARNINGS=all $(PYTHON) psutil/tests/test_posix.py
+ PYTHONPATH=$(PYTHONPATH) PSUTIL_TESTING=1 PYTHONWARNINGS=all $(PYTHON) psutil/tests/test_posix.py
test-platform: ## Run specific platform tests only.
- PSUTIL_TESTING=1 PYTHONWARNINGS=all $(PYTHON) psutil/tests/test_`$(PYTHON) -c 'import psutil; print([x.lower() for x in ("LINUX", "BSD", "OSX", "SUNOS", "WINDOWS", "AIX") if getattr(psutil, x)][0])'`.py
+ PYTHONPATH=$(PYTHONPATH) PSUTIL_TESTING=1 PYTHONWARNINGS=all $(PYTHON) psutil/tests/test_`$(PYTHON) -c 'import psutil; print([x.lower() for x in ("LINUX", "BSD", "OSX", "SUNOS", "WINDOWS", "AIX") if getattr(psutil, x)][0])'`.py
test-memleaks: ## Memory leak tests.
- PSUTIL_TESTING=1 PYTHONWARNINGS=all $(PYTHON) psutil/tests/test_memory_leaks.py
+ PYTHONPATH=$(PYTHONPATH) PSUTIL_TESTING=1 PYTHONWARNINGS=all $(PYTHON) psutil/tests/test_memory_leaks.py
test-by-name: ## e.g. make test-by-name ARGS=psutil.tests.test_system.TestSystemAPIs
- @PSUTIL_TESTING=1 PYTHONWARNINGS=all $(PYTHON) -m unittest -v $(ARGS)
+ PYTHONPATH=$(PYTHONPATH) @PSUTIL_TESTING=1 PYTHONWARNINGS=all $(PYTHON) -m unittest -v $(ARGS)
test-coverage: ## Run test coverage.
# Note: coverage options are controlled by .coveragerc file
rm -rf .coverage htmlcov
- PSUTIL_TESTING=1 PYTHONWARNINGS=all $(PYTHON) -m coverage run $(TSCRIPT)
+ PYTHONPATH=$(PYTHONPATH) PSUTIL_TESTING=1 PYTHONWARNINGS=all $(PYTHON) -m coverage run $(TSCRIPT)
$(PYTHON) -m coverage report
@echo "writing results to htmlcov/index.html"
$(PYTHON) -m coverage html
--
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