bisect-kit: improve python3 compatibility

This CL addresses:
 - mock import path
 - always close open'ed object
 - lambda syntax

Also catch up with chromite's pylintrc.

BUG=b:140004822
TEST=unittest

Change-Id: I5971f775a04737be080ed4a37bacc11fc3467da7
diff --git a/switch_git_test.py b/switch_git_test.py
index 8edd512..76eb4cb 100644
--- a/switch_git_test.py
+++ b/switch_git_test.py
@@ -7,7 +7,11 @@
 from __future__ import print_function
 import unittest
 
-import mock
+try:
+  from unittest import mock
+except ImportError:
+  # TODO(kcwu): remove once migrated to python3
+  import mock
 
 import switch_git