diff options
author | Waylan Limberg <waylan@gmail.com> | 2012-03-19 10:18:21 -0400 |
---|---|---|
committer | Waylan Limberg <waylan@gmail.com> | 2012-03-19 10:18:21 -0400 |
commit | 4dd11abae221fdd76d863487fac16ee45b05c96b (patch) | |
tree | 9571e6cd49f689492b500a34360ba02ec707ad75 /tests | |
parent | f842c9aaabd1815a5a045b0575ef73e7d02c3136 (diff) | |
download | markdown-4dd11abae221fdd76d863487fac16ee45b05c96b.tar.gz markdown-4dd11abae221fdd76d863487fac16ee45b05c96b.tar.bz2 markdown-4dd11abae221fdd76d863487fac16ee45b05c96b.zip |
Fixed #85. Odict now handles link errors correctly.
Also added a test. Thanks for the report.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_apis.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_apis.py b/tests/test_apis.py index 218c009..0296f27 100644 --- a/tests/test_apis.py +++ b/tests/test_apis.py @@ -214,6 +214,14 @@ class TestOrderedDict(unittest.TestCase): [('first', 'This'), ('fourth', 'self'), ('third', 'a'), ('fifth', 'test')]) + def textBadLink(self): + """ Test OrderedDict change order with bad location. """ + self.assertRaises(ValueError, self.odict.link('fourth', '<bad')) + # Check for data integrity ("fourth" wasn't deleted).' + self.assertEqual(self.odict.items(), + [('first', 'This'), ('third', 'a'), + ('fourth', 'self'), ('fifth', 'test')]) + class TestErrors(unittest.TestCase): """ Test Error Reporting. """ |