We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4a3906e commit 5092f37Copy full SHA for 5092f37
1 file changed
src/tests/test_configobj.py
@@ -640,6 +640,23 @@ def test_with_hash(self):
640
'key4': [1, 2, 3, 'a mixed list#']
641
}
642
643
+ def test_empty_value(self):
644
+ cfg = ConfigObj(['k = '], unrepr=True)
645
+ assert cfg == {'k': ''}
646
+
647
+ def test_unclosed_quote(self):
648
+ with pytest.raises(co.UnreprError) as excinfo:
649
+ ConfigObj(['k = "'], unrepr=True)
650
+ assert str(excinfo.value) == (
651
+ "Parse error from unrepr-ing value at line 1.")
652
653
+ def test_multiline_string_empty(self):
654
+ config = ['k = """', '"""']
655
656
+ ConfigObj(config, unrepr=True)
657
658
+ "Parse error from unrepr-ing multiline value at line 2.")
659
660
661
class TestValueErrors(object):
662
def test_bool(self, empty_cfg):
0 commit comments