summaryrefslogtreecommitdiff
path: root/functionaltests
diff options
context:
space:
mode:
authorfuzzyman <devnull@localhost>2010-02-27 18:21:19 +0000
committerfuzzyman <devnull@localhost>2010-02-27 18:21:19 +0000
commita1a9c089da21fa3cd511ebfef316aa70f44b1c08 (patch)
treed5c0019e387da90ac24f667274dcd2088b03b476 /functionaltests
parent1c026e33f66be248ae380d7f7501e0216d5fb9d3 (diff)
downloadconfigobj-git-a1a9c089da21fa3cd511ebfef316aa70f44b1c08.tar.gz
Fix for 2.3 compatibility and version number bump.
Diffstat (limited to 'functionaltests')
-rw-r--r--functionaltests/test_configobj.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/functionaltests/test_configobj.py b/functionaltests/test_configobj.py
index 73ecf25..53845e6 100644
--- a/functionaltests/test_configobj.py
+++ b/functionaltests/test_configobj.py
@@ -53,4 +53,13 @@ class TestConfigObj(unittest.TestCase):
c['a'].append('%(b)s')
c['b'] = 'bar'
self.assertEqual(c.pop('a'), ['bar'])
+
+ def test_with_default(self):
+ c = ConfigObj()
+ c['a'] = 3
+
+ self.assertEqual(c.pop('a'), 3)
+ self.assertEqual(c.pop('b', 3), 3)
+ self.assertRaises(KeyError, c.pop, 'c')
+