foo
This commit is contained in:
		
							parent
							
								
									7e4f319ad4
								
							
						
					
					
						commit
						a75ee8e097
					
				|  | @ -0,0 +1,22 @@ | ||||||
|  | #!/usr/bin/env python | ||||||
|  | 
 | ||||||
|  | import sys | ||||||
|  | import subprocess | ||||||
|  | 
 | ||||||
|  | cmd = [sys.executable, 'speedtest.py', '--source', '127.0.0.1'] | ||||||
|  | 
 | ||||||
|  | p = subprocess.Popen( | ||||||
|  |     cmd, | ||||||
|  |     stdout=subprocess.PIPE, | ||||||
|  |     stderr=subprocess.PIPE | ||||||
|  | ) | ||||||
|  | 
 | ||||||
|  | stdout, stderr = p.communicate() | ||||||
|  | 
 | ||||||
|  | if p.returncode != 1: | ||||||
|  |     raise SystemExit('%s did not fail with exit code 1' % ' '.join(cmd)) | ||||||
|  | 
 | ||||||
|  | if b'Invalid argument' not in stderr: | ||||||
|  |     raise SystemExit( | ||||||
|  |         '"Invalid argument" not found in stderr:\n%s' % stderr.decode() | ||||||
|  |     ) | ||||||
							
								
								
									
										4
									
								
								tox.ini
								
								
								
								
							
							
						
						
									
										4
									
								
								tox.ini
								
								
								
								
							|  | @ -8,7 +8,7 @@ commands = | ||||||
|     {envpython} -m compileall speedtest.py |     {envpython} -m compileall speedtest.py | ||||||
|     {envpython} speedtest.py |     {envpython} speedtest.py | ||||||
|     {envpython} speedtest.py --source 172.17.0.1 |     {envpython} speedtest.py --source 172.17.0.1 | ||||||
|     bash -c \'{envpython} speedtest.py --source 127.0.0.1 | grep "Invalid argument"\' |     {envpython} tests/scripts/source.py | ||||||
| 
 | 
 | ||||||
| [testenv:flake8] | [testenv:flake8] | ||||||
| basepython=python | basepython=python | ||||||
|  | @ -24,4 +24,4 @@ commands = | ||||||
|     pypy -m compileall speedtest.py |     pypy -m compileall speedtest.py | ||||||
|     pypy speedtest.py |     pypy speedtest.py | ||||||
|     pypy speedtest.py --source 172.17.0.1 |     pypy speedtest.py --source 172.17.0.1 | ||||||
|     bash -c \'pypy speedtest.py --source 127.0.0.1 | grep "Invalid argument"\' |     pypy tests/scripts/source.py | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue