'Test try int'

def test_try_int(self):

    test_cases = {None: 0, u'': 0, u'123': 123, u'-123': (-123), u'12.3': 0, u'-12.3': 0, 0: 0, 123: 123, (-123): (-123), 12.3: 12, (-12.3): (-12)}
    unicode_test_cases = {u'': 0, u'123': 123, u'-123': (-123), u'12.3': 0, u'-12.3': 0}
    for test in (test_cases, unicode_test_cases):
        for (candidate, result) in six.iteritems(test):
            self.assertEqual(try_int(candidate), result)
