~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_knit.py

  • Committer: John Arbash Meinel
  • Date: 2011-05-11 11:35:28 UTC
  • mto: This revision was merged to the branch mainline in revision 5851.
  • Revision ID: john@arbash-meinel.com-20110511113528-qepibuwxicjrbb2h
Break compatibility with python <2.6.

This includes auditing the code for places where we were doing
explicit 'sys.version' checks and removing them as appropriate.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1192
1192
            self.assertRaises(errors.KnitCorrupt, index.keys)
1193
1193
        except TypeError, e:
1194
1194
            if (str(e) == ('exceptions must be strings, classes, or instances,'
1195
 
                           ' not exceptions.IndexError')
1196
 
                and sys.version_info[0:2] >= (2,5)):
 
1195
                           ' not exceptions.IndexError')):
1197
1196
                self.knownFailure('Pyrex <0.9.5 fails with TypeError when'
1198
1197
                                  ' raising new style exceptions with python'
1199
1198
                                  ' >=2.5')
1212
1211
            self.assertRaises(errors.KnitCorrupt, index.keys)
1213
1212
        except TypeError, e:
1214
1213
            if (str(e) == ('exceptions must be strings, classes, or instances,'
1215
 
                           ' not exceptions.ValueError')
1216
 
                and sys.version_info[0:2] >= (2,5)):
 
1214
                           ' not exceptions.ValueError')):
1217
1215
                self.knownFailure('Pyrex <0.9.5 fails with TypeError when'
1218
1216
                                  ' raising new style exceptions with python'
1219
1217
                                  ' >=2.5')
1232
1230
            self.assertRaises(errors.KnitCorrupt, index.keys)
1233
1231
        except TypeError, e:
1234
1232
            if (str(e) == ('exceptions must be strings, classes, or instances,'
1235
 
                           ' not exceptions.ValueError')
1236
 
                and sys.version_info[0:2] >= (2,5)):
 
1233
                           ' not exceptions.ValueError')):
1237
1234
                self.knownFailure('Pyrex <0.9.5 fails with TypeError when'
1238
1235
                                  ' raising new style exceptions with python'
1239
1236
                                  ' >=2.5')
1250
1247
            self.assertRaises(errors.KnitCorrupt, index.keys)
1251
1248
        except TypeError, e:
1252
1249
            if (str(e) == ('exceptions must be strings, classes, or instances,'
1253
 
                           ' not exceptions.ValueError')
1254
 
                and sys.version_info[0:2] >= (2,5)):
 
1250
                           ' not exceptions.ValueError')):
1255
1251
                self.knownFailure('Pyrex <0.9.5 fails with TypeError when'
1256
1252
                                  ' raising new style exceptions with python'
1257
1253
                                  ' >=2.5')
1268
1264
            self.assertRaises(errors.KnitCorrupt, index.keys)
1269
1265
        except TypeError, e:
1270
1266
            if (str(e) == ('exceptions must be strings, classes, or instances,'
1271
 
                           ' not exceptions.ValueError')
1272
 
                and sys.version_info[0:2] >= (2,5)):
 
1267
                           ' not exceptions.ValueError')):
1273
1268
                self.knownFailure('Pyrex <0.9.5 fails with TypeError when'
1274
1269
                                  ' raising new style exceptions with python'
1275
1270
                                  ' >=2.5')