From 5006f99109d93e2e9cab5c74be67ec39b94bb513 Mon Sep 17 00:00:00 2001 From: Maik Hoepfel Date: Wed, 8 Mar 2017 12:38:10 +0800 Subject: [PATCH] Suppress warning about slow test The kitchen sink test expectedly can be slow. So far it wasn't slow enough for hypothesis to trigger a warning, but today Travis must've had a bad day. I think for this test is is acceptable to exceed hypothesis' warning threshold. --- daphne/tests/test_http_request.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/daphne/tests/test_http_request.py b/daphne/tests/test_http_request.py index 998ab47..4ba7dda 100644 --- a/daphne/tests/test_http_request.py +++ b/daphne/tests/test_http_request.py @@ -8,7 +8,7 @@ import unittest from six.moves.urllib import parse from asgiref.inmemory import ChannelLayer -from hypothesis import given, assume +from hypothesis import given, assume, settings, HealthCheck from twisted.test import proto_helpers from daphne.http_protocol import HTTPFactory @@ -98,6 +98,8 @@ class TestHTTPRequestSpec(testcases.ASGITestCase): request_headers=http_strategies.headers(), request_body=http_strategies.http_body(), ) + # This test is slow enough that on Travis, hypothesis sometimes complains. + @settings(suppress_health_check=[HealthCheck.too_slow]) def test_kitchen_sink( self, request_method, request_path, request_params, request_headers, request_body): """