mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Fixes an issue in test_testsuite.py that causes errors in python 3.5.
Also removes the condition in python 3.3, since it's no longer an issue.
This commit is contained in:
parent
6aa05ace19
commit
32e7b97fc0
1 changed files with 8 additions and 5 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue