Sat, 13 May 2017 11:52:44 -0700 tests: use context manager form of assertRaises
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 13 May 2017 11:52:44 -0700] rev 32279
tests: use context manager form of assertRaises Support for using unittest.TestCase.assertRaises as a context manager was added in Python 2.7. This form is more readable, especially for complex tests. While I was here, I also restored the use of assertRaisesRegexp, which was removed in c6921568cd20 for Python 2.6 compatibility.
Sat, 13 May 2017 11:42:42 -0700 obsolete: use 2 argument form of enumerate()
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 13 May 2017 11:42:42 -0700] rev 32278
obsolete: use 2 argument form of enumerate() The 2 argument form of enumerate was added in Python 2.6. This change effectively reverts 10880c8aad85.
(0) -30000 -10000 -3000 -1000 -300 -100 -30 -10 -2 +2 +10 +30 +100 +300 +1000 +3000 +10000 tip