I'm using (abusing) collections.Counter to hold non-negative floats. Something like Counter(a=4.5, b=3.4). The problem I faced is that in some case, when comparing two counters, I ran into accuracy issues. Thus, I needed to use something like unittest.TestCase.assertAlmostEqual. However, abs is not supported for Counter's. So, I wrote the following utility:def assert_almost_equal_counters(c1,c2):    testcase = unittest.TestCase()    testcase.assertEqual(type(c1), type(c2))    testcase.assertEqual(c1.keys(), c2.keys())    for key in c1.keys():        testcase.assertAlmostEqual(c1[key], c2[key])Is it enough? Did I miss something?
Comparing almost equal Counters
python;unit testing