From 9a5b11116e2ea8a240fa2d03cad9de334023da9d Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Fri, 29 Aug 2014 20:00:39 -0400 Subject: Mark special treatment of extension names as PendingDeprecation The builtin extensions will no longer get special treatment and have the path ("markdown.extensions.") appended . The same applies for "mdx_" extensions. All names extension must provide the full path. Fixes #336. Also deprecating support for passing in extension config settings as part of the string name. The extension_configs keyword should be used instead. Fixes #335. Also raising PendingDeprecationWarnings for positional args or the "config" keyword on the Extension Class. Pass each setting as a seperate keyword instead. Docs and tests are updated. Still need to update extension API docs. --- tests/test_extensions.py | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'tests/test_extensions.py') diff --git a/tests/test_extensions.py b/tests/test_extensions.py index a7be627..a21fd94 100644 --- a/tests/test_extensions.py +++ b/tests/test_extensions.py @@ -47,22 +47,6 @@ class TestExtensionClass(unittest.TestCase): # self.ext.setConfig('bad', 'baz) ==> KeyError self.assertRaises(KeyError, self.ext.setConfig, 'bad', 'baz') - def testConfigAsArgListOnInit(self): - ext = self.ExtKlass([('foo', 'baz'), ('bar', 'blah')]) - self.assertEqual(ext.getConfigs(), {'foo': 'baz', 'bar': 'blah'}) - - def testConfigAsArgDictOnInit(self): - ext = self.ExtKlass({'foo': 'baz', 'bar': 'blah', 'bar': 'blah'}) - self.assertEqual(ext.getConfigs(), {'foo': 'baz', 'bar': 'blah'}) - - def testConfigAsKwargListOnInit(self): - ext = self.ExtKlass(configs=[('foo', 'baz'), ('bar', 'blah')]) - self.assertEqual(ext.getConfigs(), {'foo': 'baz', 'bar': 'blah'}) - - def testConfigAsKwargDictOnInit(self): - ext = self.ExtKlass(configs={'foo': 'baz', 'bar': 'blah'}) - self.assertEqual(ext.getConfigs(), {'foo': 'baz', 'bar': 'blah'}) - def testConfigAsKwargsOnInit(self): ext = self.ExtKlass(foo='baz', bar='blah') self.assertEqual(ext.getConfigs(), {'foo': 'baz', 'bar': 'blah'}) -- cgit v1.2.3