aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_apis.py
Commit message (Collapse)AuthorAgeFilesLines
* Tables: Improvements (#530)Isaac Muse2017-01-191-0/+12
| | | | | | | Tables now handle escaped pipes when testing, in table borders, and in the inline content. To achieve properly, a bug had to be fixed related to appending escaped chars to the Markdown class. Now appended chars only appear in the current instance. Lastly the first backtick in a table can be escaped rounding out the last corner case.
* Only log warnings from commandline script.Waylan Limberg2015-01-311-3/+2
| | | | | | | | | I need to remember this is a lib first and not configure logging from within the lib. Also, from the script we are now actually displaying deprecation warnings. For some reason I don't understnad deprecation warnings are hidden by default in Python. And who remembers to run Python with the `-Wd` flag every time they upgrade a lib just to make sure there's no new deprecations? Fixes #384.
* PendingDeprecationWarning (v2.5) => DeprecationWarning (v2.6)Waylan Limberg2014-12-301-6/+6
|
* Completed flake8 cleanup.Waylan Limberg2014-11-201-101/+203
| | | | | I've decided to go with longer lines in the tests. Also fixed a couple errors with the previous cleanup.
* Fix the lost tail issue in inlineprocessors.facelessuser2014-09-261-0/+14
| | | | | | See #253. Prior to this patch, if any inline processors returned an element with a tail, the tail would end up empty. This resolves that issue and will allow for #253 to be fixed. Thanks to @facelessuser for the work on this.
* Added a temp workwround for deprecated short ext names.Waylan Limberg2014-09-251-9/+6
| | | | | | | | | | | | As we chnaged the order in import trys for short names extensions (no dot syntax), an extra test was added to the import code for the occassion when a naming conflict exists. For example, if PyTables is installed (module name is tables) and the user tries to use the short name 'tables' instead of 'markdown.extensions.tables'. Fixes #341. Of course, this code will get ripped out when the old behavior is fully deprecated.
* Fixed TOC Option parsing.Waylan Limberg2014-09-251-1/+14
| | | | | | The new option parser assumes bool values if the default is bool or None. As the "title" option is not a bool value, it should default to an empty string rather than None. Fixes #347.
* Mark special treatment of extension names as PendingDeprecationWaylan Limberg2014-08-291-5/+15
| | | | | | | | | | | | | | | | | 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.
* More updates to test configs.Waylan Limberg2014-08-291-2/+2
| | | | | | | | | | | | | | The last few extensions were updated to accept dicts/**kwargs as configs and more tests were updated. Also updated extra to actually accept configs. Note that extra requires an extra level of dicts. First you need to indicate tha the settings are for extra, then, which extension extra wraps. I'm not crazy abount this, bit not sur ehow else to do it without making all the configs a global attribute on the Markdown class to that any extention can access any other extensions config settings. I don't think we wnat to do that. Also updated extra to use dot notation for the sub-extensions.
* All extension tests now use python dot notation.Waylan Limberg2014-08-291-8/+10
| | | | | | | | | | All named extensions now use python dot notation in the tests - including all builtin extensions (eg: 'extra' => 'markdown.extensions.extra'). This is in anticipation of #336. Note there are a few tests (in the error tests) that will still need updating, but not till we make the change as they will test for the new error message.
* Allow named extensions to specify the Class NameWaylan Limberg2014-08-271-2/+15
| | | | | | | | | | | | | | | | | | If you were to import the class like this: from path.to.module import SomeExtensionClass Then the named extension would be the string: "path.to.module:SomeExtensionClass" This should simplify loading extensions from the command line or template filters -- expecially when multiple extensions are defined in a single python module. The docs still need updating. I'm waiting to update the docs after implementing #335 and #336 as that will require a major refactor of that section of the docs anyway.
* Refactored extension importing.Waylan Limberg2014-08-271-8/+17
| | | | | | | | | | | | | We now use importlib which means we no longer support Python 2.6. Also, this refactor properly imports third party extensions which reside at the root of PYTHONPATH. Previously, either `markdown.extensions.` or `mdx_` would be appended to any extension name that did not contain a dot, which required third party extensions to either be in submodules or use the old `mdx_` naming convention. This commit is also in preperation for #336. It will now be much easier to deprecate (and later remove) support for the old ways of handling extension names.
* Fixed a bug in markdown.util.parseBoolValueWaylan Limberg2014-08-251-0/+5
| | | | | A couple scenarios with "None" were previously not accounted for. Also updated tests which guives us 100% for markdown/util.py
* Add test of unsafe HTML in stash with safe_mode='excape'Waylan Limberg2014-08-251-0/+20
| | | | This should give us 100% coverage of postprocessors.py.
* Added `--extension_configs` option to the CLI.Waylan Limberg2014-08-221-0/+141
| | | | | | | | | | The `--extension_configs` option must point to a YAML or JSON file. The contents of the file must parse to a Python Dict which will be passed to the `extension_configs` keyword of the `markdown.Markdown` class. Also added tests for all of the CLI option parsing options and updated documentation.
* No assertIs in Python 2.6. Fixes #294Waylan Limberg2014-04-201-1/+1
|
* Add tests for the previous two commitsDmitry Shachnev2013-09-251-0/+13
|
* Allow extensions to register serializersWaylan Limberg2013-08-071-0/+18
| | | | | | | | | Setting output_format must happen after extensions are loaded. Only in that way can an extension register a serializer so that it will then be available to be used with the output_format keyword. A test has been added to avoid this regression from happening again in the future. Fixes #238, partially reverses commit 41cc055 and provides a better fix for
* Serializers now preserve case of tags.Waylan Limberg2013-08-071-0/+32
| | | | | | | It is up to the markdown code (and extension authors to make sure tags are of the correct case (there may be cases were an extension might need to mix cases - which should be preserved). Fixes #237. Thanks for the report @eichin.
* Remove some unused importsDmitry Shachnev2013-03-231-1/+0
|
* Testing framework now runs on Python 2 & 3 unmodified.Waylan Limberg2012-12-141-21/+27
|
* Don't import from doctest, it's no longer usedDmitry Shachnev2012-08-261-1/+0
|
* Fixed #112 and cleaned up error reporting when loading extensions.Waylan Limberg2012-07-121-3/+3
|
* Fixed #85. Odict now handles link errors correctly.Waylan Limberg2012-03-191-0/+8
| | | | Also added a test. Thanks for the report.
* It is spelled 'serializers' not 'searializers'.Waylan Limberg2012-01-201-7/+7
|
* TestCase.assert_ and TestCase.failUnless are depreciated in Python 3 in ↵Waylan Limberg2011-07-281-3/+3
| | | | favor of testCase.assertTrue. Might as well be using the right method in our tests.
* Skip the UnidoceDecodeError API test in Python 3.x as all input should be ↵Waylan Limberg2011-07-281-2/+3
| | | | unicode anyway.
* All API tests now utilize our own searializers.Waylan Limberg2011-07-271-3/+5
|
* Fixed a few failing API tests. ElementTree is only available from ↵Waylan Limberg2011-06-211-5/+5
| | | | markdown.util.etree not markdown.etree. This may be a backward incompatable change for some extensions.
* Added our own xhtml searializer. We no longer use a xml searializer to ↵Waylan Limberg2011-06-161-6/+6
| | | | output xhtml. This fixes #9 among other bugs. The test suite even had bad tests that should have been failing. They also have been corrected.
* Update tests for logging changes. No more message function.Waylan Limberg2011-04-281-21/+6
|
* Fixed Ticket 74. AtomicStrings should now be ackowledged (and preserved) in ↵Waylan Limberg2010-11-041-0/+45
| | | | all instances. This was a real pain to debug, but an easy fix once I found it. Thanks to obs for the report.
* Fixed previous two commits. cElementTree cannot use ElementTree nodes in the ↵Waylan Limberg2010-10-311-2/+6
| | | | tree, but it still uses ElementTree Comment assinged to a node's tag to test for Comment nodes. Also no longer considering Commet nodes to be block level.
* Fixed Ticket 80. Added support for ElementTree Comments to be included by ↵Waylan Limberg2010-10-291-0/+36
| | | | third party extensions when using cElementTree.
* Fixed Ticket 71. Wrapper functions no longer do there own thing with ↵Waylan Limberg2010-08-291-2/+2
| | | | extensions. All behavior is now within the class.
* Added logging imports to markdown.extensions which were missed in recent ↵Waylan Limberg2010-07-221-0/+75
| | | | reorg. Also added tests to make sure erros and warnings are raised where they should be.
* Removed Global variable HTML_PLACEHOLDER. Use HtmlStash.get_placeholder(key) ↵Waylan Limberg2010-07-061-4/+2
| | | | if you need it.
* Moved HtmlStash and base Prosessor classes to the new util module.Waylan Limberg2010-07-061-3/+3
|
* Moved test dir back out of markdown lib. We don't need to install the tests ↵Waylan Limberg2010-02-121-0/+214
in everyones site-packages. We just need to distrubute them in the tarball for people to run before installing etc.