forked from pool/python-mitmproxy
		
	Accepting request 944473 from home:bnavigator:branches:devel:languages:python
- Register obs hypothesis profile for slow test executions OBS-URL: https://build.opensuse.org/request/show/944473 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-mitmproxy?expand=0&rev=9
This commit is contained in:
		@@ -1,3 +1,8 @@
 | 
				
			|||||||
 | 
					-------------------------------------------------------------------
 | 
				
			||||||
 | 
					Thu Jan  6 13:33:12 UTC 2022 - Ben Greiner <code@bnavigator.de>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- Register obs hypothesis profile for slow test executions
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-------------------------------------------------------------------
 | 
					-------------------------------------------------------------------
 | 
				
			||||||
Wed Dec  8 21:07:48 UTC 2021 - Ferdinand Thiessen <rpm@fthiessen.de>
 | 
					Wed Dec  8 21:07:48 UTC 2021 - Ferdinand Thiessen <rpm@fthiessen.de>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
#
 | 
					#
 | 
				
			||||||
# spec file for package python-mitmproxy
 | 
					# spec file for package python-mitmproxy
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# Copyright (c) 2021 SUSE LLC
 | 
					# Copyright (c) 2022 SUSE LLC
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# All modifications and additions to the file contributed by third parties
 | 
					# All modifications and additions to the file contributed by third parties
 | 
				
			||||||
# remain the property of their copyright owners, unless otherwise agreed
 | 
					# remain the property of their copyright owners, unless otherwise agreed
 | 
				
			||||||
@@ -106,6 +106,18 @@ sed -i '1 {\@^#!/usr/bin/env@ d}' mitmproxy/utils/emoji.py
 | 
				
			|||||||
sed -i 's/,\s*<.*"/"/g' setup.py
 | 
					sed -i 's/,\s*<.*"/"/g' setup.py
 | 
				
			||||||
rm mitmproxy/contrib/kaitaistruct/make.sh
 | 
					rm mitmproxy/contrib/kaitaistruct/make.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					sed -i 's/--color=yes//' setup.cfg
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					echo "
 | 
				
			||||||
 | 
					# increase test deadline for slow obs executions
 | 
				
			||||||
 | 
					import hypothesis
 | 
				
			||||||
 | 
					hypothesis.settings.register_profile(
 | 
				
			||||||
 | 
					    'obs',
 | 
				
			||||||
 | 
					    deadline=5000,
 | 
				
			||||||
 | 
					    suppress_health_check=[hypothesis.HealthCheck.too_slow]
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					" >> test/conftest.py
 | 
				
			||||||
 | 
					
 | 
				
			||||||
%build
 | 
					%build
 | 
				
			||||||
%python_build
 | 
					%python_build
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -120,7 +132,7 @@ rm mitmproxy/contrib/kaitaistruct/make.sh
 | 
				
			|||||||
# test_refresh fails on i586... wrong timestamp type, maybe?
 | 
					# test_refresh fails on i586... wrong timestamp type, maybe?
 | 
				
			||||||
# test_rollback and test_output[None-expected_out0-expected_err0] just randomly fail on i586
 | 
					# test_rollback and test_output[None-expected_out0-expected_err0] just randomly fail on i586
 | 
				
			||||||
# test_get_version fails to mock updated git version
 | 
					# test_get_version fails to mock updated git version
 | 
				
			||||||
%pytest -k "not (test_refresh or test_rollback or test_output or test_get_version)"
 | 
					%pytest -k "not (test_refresh or test_rollback or test_output or test_get_version)" --hypothesis-profile="obs"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
%post
 | 
					%post
 | 
				
			||||||
%python_install_alternative mitmdump
 | 
					%python_install_alternative mitmdump
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user