This commit is contained in:
Deniz Turgut 2017-04-17 04:43:49 +00:00 committed by GitHub
commit 3362a654e1

View file

@ -1,16 +1,19 @@
# -*- coding: utf-8 -*-
from __future__ import print_function, unicode_literals
import sys
import warnings
import six
from pelican.tests.support import unittest
class TestSuiteTest(unittest.TestCase):
@unittest.skipIf(sys.version_info[:2] == (3, 3),
"does not throw an exception on python 3.3")
def test_error_on_warning(self):
with self.assertRaises(UserWarning):
if six.PY2:
asserter = self.assertRaises
else:
asserter = self.assertWarns
with asserter(UserWarning):
warnings.warn('test warning')