Skip to content

Commit

Permalink
Silence DeprecationWarning on Py3.4.
Browse files Browse the repository at this point in the history
  • Loading branch information
onyxfish committed Dec 29, 2016
1 parent e462ab6 commit 4a91e29
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/test_table/test_print_html.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env python
# -*- coding: utf8 -*-

import warnings

import six
from six.moves import html_parser

Expand All @@ -13,8 +15,12 @@ class TableHTMLParser(html_parser.HTMLParser):
"""
Parser for use in testing HTML rendering of tables.
"""
def __init__(self, *args, **kwargs):
html_parser.HTMLParser.__init__(self, *args, **kwargs)
def __init__(self):
with warnings.catch_warnings():
# Silence deprecation warning
warnings.simplefilter('ignore')

html_parser.HTMLParser.__init__(self)

self.has_table = False
self.has_thead = False
Expand Down

0 comments on commit 4a91e29

Please sign in to comment.