@@ -96,16 +96,16 @@ def test_basic(self):
9696 eq (cf .get ('Spaces' , 'key with spaces' ), 'value' )
9797 eq (cf .get ('Spaces' , 'another with spaces' ), 'splat!' )
9898
99- self .failIf ('__name__' in cf .options ("Foo Bar" ),
99+ self .assertFalse ('__name__' in cf .options ("Foo Bar" ),
100100 '__name__ "option" should not be exposed by the API!' )
101101
102102 # Make sure the right things happen for remove_option();
103103 # added to include check for SourceForge bug #123324:
104- self .failUnless (cf .remove_option ('Foo Bar' , 'foo' ),
104+ self .assertTrue (cf .remove_option ('Foo Bar' , 'foo' ),
105105 "remove_option() failed to report existance of option" )
106- self .failIf (cf .has_option ('Foo Bar' , 'foo' ),
106+ self .assertFalse (cf .has_option ('Foo Bar' , 'foo' ),
107107 "remove_option() failed to remove option" )
108- self .failIf (cf .remove_option ('Foo Bar' , 'foo' ),
108+ self .assertFalse (cf .remove_option ('Foo Bar' , 'foo' ),
109109 "remove_option() failed to report non-existance of option"
110110 " that was removed" )
111111
@@ -127,10 +127,10 @@ def test_case_sensitivity(self):
127127 eq (cf .options ("a" ), ["b" ])
128128 eq (cf .get ("a" , "b" ), "value" ,
129129 "could not locate option, expecting case-insensitive option names" )
130- self .failUnless (cf .has_option ("a" , "b" ))
130+ self .assertTrue (cf .has_option ("a" , "b" ))
131131 cf .set ("A" , "A-B" , "A-B value" )
132132 for opt in ("a-b" , "A-b" , "a-B" , "A-B" ):
133- self .failUnless (
133+ self .assertTrue (
134134 cf .has_option ("A" , opt ),
135135 "has_option() returned false for option which should exist" )
136136 eq (cf .options ("A" ), ["a-b" ])
@@ -147,7 +147,7 @@ def test_case_sensitivity(self):
147147 # SF bug #561822:
148148 cf = self .fromstring ("[section]\n nekey=nevalue\n " ,
149149 defaults = {"key" :"value" })
150- self .failUnless (cf .has_option ("section" , "Key" ))
150+ self .assertTrue (cf .has_option ("section" , "Key" ))
151151
152152 def test_default_case_sensitivity (self ):
153153 cf = self .newconfig ({"foo" : "Bar" })
@@ -182,7 +182,7 @@ def test_query_errors(self):
182182 cf = self .newconfig ()
183183 self .assertEqual (cf .sections (), [],
184184 "new ConfigParser should have no defined sections" )
185- self .failIf (cf .has_section ("Foo" ),
185+ self .assertFalse (cf .has_section ("Foo" ),
186186 "new ConfigParser should have no acknowledged sections" )
187187 self .assertRaises (ConfigParser .NoSectionError ,
188188 cf .options , "Foo" )
@@ -221,8 +221,8 @@ def test_boolean(self):
221221 "E5=FALSE AND MORE"
222222 )
223223 for x in range (1 , 5 ):
224- self .failUnless (cf .getboolean ('BOOLTEST' , 't%d' % x ))
225- self .failIf (cf .getboolean ('BOOLTEST' , 'f%d' % x ))
224+ self .assertTrue (cf .getboolean ('BOOLTEST' , 't%d' % x ))
225+ self .assertFalse (cf .getboolean ('BOOLTEST' , 'f%d' % x ))
226226 self .assertRaises (ValueError ,
227227 cf .getboolean , 'BOOLTEST' , 'e%d' % x )
228228
0 commit comments