File tree 1 file changed +11
-0
lines changed
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ def test_describe_option(self):
75
75
self .cf .register_option ('g.h' , 1 )
76
76
self .cf .register_option ('k' , 2 )
77
77
self .cf .deprecate_option ('g.h' , rkey = "k" )
78
+ self .cf .register_option ('l' , "foo" )
78
79
79
80
# non-existent keys raise KeyError
80
81
self .assertRaises (KeyError , self .cf .describe_option , 'no.such.key' )
@@ -103,6 +104,16 @@ def test_describe_option(self):
103
104
self .assertTrue (
104
105
'k' in self .cf .describe_option ('g.h' , _print_desc = False ))
105
106
107
+ # default is reported
108
+ self .assertTrue (
109
+ 'foo' in self .cf .describe_option ('l' , _print_desc = False ))
110
+ # current value is reported
111
+ self .assertFalse (
112
+ 'bar' in self .cf .describe_option ('l' , _print_desc = False ))
113
+ self .cf .set_option ("l" ,"bar" )
114
+ self .assertTrue (
115
+ 'bar' in self .cf .describe_option ('l' , _print_desc = False ))
116
+
106
117
def test_case_insensitive (self ):
107
118
self .cf .register_option ('KanBAN' , 1 , 'doc' )
108
119
You can’t perform that action at this time.
0 commit comments