Skip to content

Commit

Permalink
fix #350 move tests in psutil namespace (and split them)
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed Feb 8, 2016
1 parent 907bde6 commit 9fd0a21
Show file tree
Hide file tree
Showing 19 changed files with 1,833 additions and 1,741 deletions.
2 changes: 2 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Bug tracker at https://github.com/giampaolo/psutil/issues
- #753: [Linux, OSX, Windows] Process USS and PSS (Linux) "real" memory stats.
(patch by Eric Rahm)
- #755: Process.memory_percent() "memtype" parameter.
- #758: tests now live in psutil namespace.
- #760: expose OS constants (LINUX, OSX, etc.)

**Bug fixes**

Expand Down
3 changes: 1 addition & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,4 @@ recursive-exclude docs/_build *
recursive-include .ci *
recursive-include docs *
recursive-include examples *.py
recursive-include psutil *.py *.c *.h
recursive-include test *.py README*
recursive-include psutil *.py *.c *.h README*
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

# You can set these variables from the command line.
PYTHON = python
TSCRIPT = test/test_psutil.py
TSCRIPT = psutil/tests/runner.py

all: test

clean:
rm -f `find . -type f -name \*.py[co]`
rm -f `find . -type f -name \*.so`
rm -f `find . -type f -name .\*~`
rm -f `find . -type f -name \*.~`
rm -f `find . -type f -name \*.orig`
rm -f `find . -type f -name \*.bak`
rm -f `find . -type f -name \*.rej`
Expand Down Expand Up @@ -57,7 +57,7 @@ setup-dev-env: install-git-hooks
unittest2 \

install: build
$(PYTHON) setup.py install --user
$(PYTHON) setup.py develop --user

uninstall:
cd ..; $(PYTHON) -m pip uninstall -y -v psutil
Expand Down
2 changes: 1 addition & 1 deletion make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if "%PYTHON%" == "" (
set PYTHON=C:\Python27\python.exe
)
if "%TSCRIPT%" == "" (
set TSCRIPT=test\test_psutil.py
set TSCRIPT=psutil\tests\runner.py
)

set VSINSTALLDIR=%VS90COMNTOOLS%..\..
Expand Down
13 changes: 13 additions & 0 deletions psutil/tests/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
- The recommended way to run tests (also on Windows) is to cd into psutil root
directory and run ``make test``.

- Depending on the Python version dependencies for running tests include
ipaddress, mock and unittest2 modules (get them on PYPI.
On Windows also pywin32 and WMIC modules are recommended (although optional).
Run ``make setup-dev-env`` to install them (also on Windows).

- To run tests on all supported Python version install tox (pip install tox)
then run ``tox``.

- Every time a commit is pushed tests are automatically run on Travis:
https://travis-ci.org/giampaolo/psutil/
Loading

0 comments on commit 9fd0a21

Please sign in to comment.