mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 17:24:31 +03:00
Test testing with pytest
This commit is contained in:
parent
341131f812
commit
e30433e4b2
|
@ -8,7 +8,9 @@ sudo apt-get -qq install libfreetype6-dev liblcms2-dev python-tk\
|
|||
libharfbuzz-dev libfribidi-dev
|
||||
|
||||
pip install cffi
|
||||
pip install nose
|
||||
pip install nose # TODO remove
|
||||
pip install pytest
|
||||
pip install pytest-cov
|
||||
pip install check-manifest
|
||||
pip install olefile
|
||||
pip install pyroma
|
||||
|
|
|
@ -7,7 +7,8 @@ python setup.py clean
|
|||
CFLAGS="-coverage" python setup.py build_ext --inplace
|
||||
|
||||
coverage run --append --include=PIL/* selftest.py
|
||||
coverage run --append --include=PIL/* -m nose -vx Tests/test_*.py
|
||||
# coverage run --append --include=PIL/* -m nose -vx Tests/test_*.py TODO remove
|
||||
py.test -v --cov PIL --cov-report term Tests
|
||||
pushd /tmp/check-manifest && check-manifest --ignore ".coveragerc,.editorconfig,*.yml,*.yaml,tox.ini" && popd
|
||||
|
||||
# Docs
|
||||
|
|
|
@ -64,8 +64,9 @@ class PillowTestCase(unittest.TestCase):
|
|||
try:
|
||||
ok = self.currentResult.wasSuccessful()
|
||||
except AttributeError: # for nosetests
|
||||
proxy = self.currentResult
|
||||
ok = (len(proxy.errors) + len(proxy.failures) == 0)
|
||||
# proxy = self.currentResult
|
||||
# ok = (len(proxy.errors) + len(proxy.failures) == 0)
|
||||
ok = True # TODO pytest
|
||||
|
||||
if ok:
|
||||
# only clean out tempfiles if test passed
|
||||
|
@ -256,8 +257,8 @@ class PillowLeakTestCase(PillowTestCase):
|
|||
# linux
|
||||
# man 2 getrusage
|
||||
# ru_maxrss (since Linux 2.6.32)
|
||||
# This is the maximum resident set size used (in kilobytes).
|
||||
return mem # Kb
|
||||
# This is the maximum resident set size used (in kilobytes).
|
||||
return mem # Kb
|
||||
|
||||
def _test_leak(self, core):
|
||||
start_mem = self._get_mem_usage()
|
||||
|
|
Loading…
Reference in New Issue
Block a user