diff options
author | Michał Górny <mgorny@gentoo.org> | 2019-11-22 11:54:59 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2019-11-22 12:44:24 +0100 |
commit | 97a50336c5cd758bb5bd2f59daca8014a5f08c18 (patch) | |
tree | 50f167858ff6987b37727f45b83624f6888da568 /dev-python/brotlipy | |
parent | dev-python/brotlipy: Fix MissingTestRestrict (diff) | |
download | gentoo-97a50336c5cd758bb5bd2f59daca8014a5f08c18.tar.gz gentoo-97a50336c5cd758bb5bd2f59daca8014a5f08c18.tar.bz2 gentoo-97a50336c5cd758bb5bd2f59daca8014a5f08c18.zip |
dev-python/brotlipy: Fix Hypothesis deadlines in tests
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/brotlipy')
-rw-r--r-- | dev-python/brotlipy/brotlipy-0.7.0.ebuild | 6 | ||||
-rw-r--r-- | dev-python/brotlipy/files/brotlipy-0.7.0-test-deadline.patch | 28 |
2 files changed, 33 insertions, 1 deletions
diff --git a/dev-python/brotlipy/brotlipy-0.7.0.ebuild b/dev-python/brotlipy/brotlipy-0.7.0.ebuild index dc21af28ce4e..d744a0167224 100644 --- a/dev-python/brotlipy/brotlipy-0.7.0.ebuild +++ b/dev-python/brotlipy/brotlipy-0.7.0.ebuild @@ -33,6 +33,10 @@ DEPEND=" ) " +PATCHES=( + "${FILESDIR}"/brotlipy-0.7.0-test-deadline.patch +) + src_prepare() { # Inject the brotli lib. rm -r "${WORKDIR}/${P}/libbrotli" || die "Could not remove the bundled brotli lib folder." @@ -41,7 +45,7 @@ src_prepare() { # Tests fail if we have this folder preserved within the lib. rm -r "${WORKDIR}/${P}/libbrotli/python" || die "Could not remove 'python' subfolder." - eapply_user + distutils-r1_src_prepare } python_test() { diff --git a/dev-python/brotlipy/files/brotlipy-0.7.0-test-deadline.patch b/dev-python/brotlipy/files/brotlipy-0.7.0-test-deadline.patch new file mode 100644 index 000000000000..219243986dd9 --- /dev/null +++ b/dev-python/brotlipy/files/brotlipy-0.7.0-test-deadline.patch @@ -0,0 +1,28 @@ +diff -dupr a/test/test_simple_compression.py b/test/test_simple_compression.py +--- a/test/test_simple_compression.py 2017-05-30 10:20:01.000000000 +0200 ++++ b/test/test_simple_compression.py 2019-11-22 11:37:31.248755016 +0100 +@@ -9,7 +9,7 @@ import brotli + + import pytest + +-from hypothesis import given ++from hypothesis import given, settings + from hypothesis.strategies import binary, integers, sampled_from, one_of + + +@@ -25,6 +25,7 @@ def test_roundtrip_compression_with_file + ) == uncompressed_data + + ++@settings(deadline=None) + @given( + chunk_size=integers(min_value=1, max_value=2**12), + mode=sampled_from(list(brotli.BrotliEncoderMode)), +@@ -62,6 +63,7 @@ def test_streaming_compression(one_compr + assert decompressed == f.read() + + ++@settings(deadline=None) + @given( + chunk_size=integers(min_value=1, max_value=2**12), + mode=sampled_from(list(brotli.BrotliEncoderMode)), |