[Python-modules-commits] [python-psutil] 04/14: pass PYTHONPATH to the test runner

Sandro Tosi morph at moszumanska.debian.org
Sun Nov 26 01:56:09 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 ca91fc96536c0032c8b3f5e253f9a61da4d1e9f3
Author: Sandro Tosi <morph at debian.org>
Date:   Sun Apr 10 13:17:47 2016 +0100

    pass PYTHONPATH to the test runner
---
 Makefile | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/Makefile b/Makefile
index 0529894..43edc7c 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.
@@ -106,43 +107,44 @@ setup-dev-env:  ## Install GIT hooks, pip, test deps (also upgrades them).
 # Tests
 # ===================================================================
 
+<<<<<<< 0d4af096fd8048c3f00a8c6392b35a4daf8c4edb
 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