Commits

zubin71 committed 11c462b

some tests moved over to the except block

Comments (0)

Files changed (1)

test_configobj.py

         try:
             c = ConfigObj(bad_syntax)
         except Exception as e:
-            pass
-            
-        self.assertTrue(isinstance(e, ConfigObjError))
-        self.assertTrue(str(e), 'Parse error in value at line 3.')        
-        self.assertEquals(len(e.errors), 1)
+            self.assertTrue(isinstance(e, ConfigObjError))
+            self.assertTrue(str(e), 'Parse error in value at line 3.')        
+            self.assertEquals(len(e.errors), 1)
         
         try:
             c = ConfigObj(bad_syntax, unrepr=True)
         except Exception as e:
-            pass
-        self.assertTrue(isinstance(e, ConfigObjError))
-        self.assertTrue(str(e), 'Parse error in value at line 3.')
-        self.assertEquals(len(e.errors), 1)
-        
-        the_error = e.errors[0]
-        self.assertTrue(isinstance(the_error, UnreprError))
+            self.assertTrue(isinstance(e, ConfigObjError))
+            self.assertTrue(str(e), 'Parse error in value at line 3.')
+            self.assertEquals(len(e.errors), 1)
+            the_error = e.errors[0]
+            self.assertTrue(isinstance(the_error, UnreprError))
         
         multiple_bad_syntax = '''
         key = "value"