mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-04 01:47:47 +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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user