From b6083e5bbf414079a5b0589eb45975c069690f35 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Tue, 29 Nov 2011 17:19:14 +0100 Subject: [PATCH] Disable some incorrect cssutils warnings. --- weasy/tests/test_draw.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/weasy/tests/test_draw.py b/weasy/tests/test_draw.py index 2faf8608..72a86ef4 100644 --- a/weasy/tests/test_draw.py +++ b/weasy/tests/test_draw.py @@ -23,9 +23,11 @@ Test the drawing functions. """ import os.path +import functools from array import array import png +import cssutils from attest import Tests, assert_hook # pylint: disable=W0611 from . import resource_filename, TestPNGDocument, FONTS @@ -703,7 +705,20 @@ def test_visibility(): span { visibility: visible } '''}) + +def disable_cssutils_validation(function): + """cssutils.profile.skipValidation = True + """ + @functools.wraps(function) + def wrapper(): + cssutils.profile.skipValidation = True + function() + cssutils.profile.skipValidation = False + return wrapper + + @SUITE.test +@disable_cssutils_validation def test_tables(): source = '''