mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Drop unsupported Python 3.3
This commit is contained in:
parent
f8da7077d8
commit
ce0787f0d3
6 changed files with 5 additions and 10 deletions
|
|
@ -14,13 +14,13 @@ import six
|
|||
from pelican.log import LimitFilter
|
||||
|
||||
try:
|
||||
# SourceFileLoader is the recommended way in 3.3+
|
||||
# SourceFileLoader is the recommended way in Python 3.3+
|
||||
from importlib.machinery import SourceFileLoader
|
||||
|
||||
def load_source(name, path):
|
||||
return SourceFileLoader(name, path).load_module()
|
||||
except ImportError:
|
||||
# but it does not exist in 3.2-, so fall back to imp
|
||||
# but it does not exist in Python 2.7, so fall back to imp
|
||||
import imp
|
||||
load_source = imp.load_source
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import print_function, unicode_literals
|
||||
|
||||
import sys
|
||||
import warnings
|
||||
|
||||
from pelican.tests.support import unittest
|
||||
|
|
@ -9,8 +8,6 @@ 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):
|
||||
warnings.warn('test warning')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue