From: Vladimír Vondruš Date: Mon, 11 Dec 2017 11:42:12 +0000 (+0100) Subject: theme, plugins: make the tests working under Python 3.4. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=81274991942e5806c6bf1156dd3ffd6030e9a413;p=blog.git theme, plugins: make the tests working under Python 3.4. --- diff --git a/pelican-plugins/m/test/__init__.py b/pelican-plugins/m/test/__init__.py index 3cfe1bd6..1f7089e9 100644 --- a/pelican-plugins/m/test/__init__.py +++ b/pelican-plugins/m/test/__init__.py @@ -41,7 +41,8 @@ class PluginTestCase(unittest.TestCase): 'DIRECT_TEMPLATES': [], 'SLUGIFY_SOURCE': 'basename' } - settings = read_settings(path=None, override={**implicit_settings, **settings}) + implicit_settings.update(settings) + settings = read_settings(path=None, override=implicit_settings) pelican = Pelican(settings=settings) pelican.run() diff --git a/pelican-theme/test/__init__.py b/pelican-theme/test/__init__.py index 7264c1ce..349dedd8 100644 --- a/pelican-theme/test/__init__.py +++ b/pelican-theme/test/__init__.py @@ -30,7 +30,8 @@ class MinimalTestCase(unittest.TestCase): 'ARTICLE_EXCLUDES': [os.path.join(self.path, 'output')], 'FEED_ALL_ATOM': None, # Don't render feeds, we're not testing them *ever* } - settings = read_settings(path=None, override={**implicit_settings, **settings}) + implicit_settings.update(settings) + settings = read_settings(path=None, override=implicit_settings) pelican = Pelican(settings=settings) pelican.run() @@ -57,7 +58,8 @@ class BaseTestCase(MinimalTestCase): 'DIRECT_TEMPLATES': ['index', 'archives'], 'SLUGIFY_SOURCE': 'basename' } - MinimalTestCase.run_pelican(self, {**implicit_settings, **settings}) + implicit_settings.update(settings) + MinimalTestCase.run_pelican(self, implicit_settings) class PageTestCase(BaseTestCase): def run_pelican(self, settings): @@ -69,7 +71,8 @@ class PageTestCase(BaseTestCase): 'ARTICLE_PATHS': ['articles'], # doesn't exist 'DIRECT_TEMPLATES': [] } - BaseTestCase.run_pelican(self, {**implicit_settings, **settings}) + implicit_settings.update(settings) + BaseTestCase.run_pelican(self, implicit_settings) class BlogTestCase(BaseTestCase): def run_pelican(self, settings): @@ -91,4 +94,5 @@ class BlogTestCase(BaseTestCase): 'AUTHOR_FEED_RSS': None, 'TRANSLATION_FEED_ATOM': None } - BaseTestCase.run_pelican(self, {**implicit_settings, **settings}) + implicit_settings.update(settings) + BaseTestCase.run_pelican(self, implicit_settings)