# -*- coding: iso-8859-1 -*-
from __future__ import division # 1/2 == .5 (par defaut, 1/2 == 0)

import unittest
import math



class CustomTest(unittest.TestCase):

    def setUp(self):
        pass

    def assertAlmostEqual(self,  x,  y):
        if isinstance(x,  tuple) and isinstance(y,  tuple):
            for x_elt,  y_elt in zip(x, y):
                TEST = abs(y_elt-x_elt)<ALL.param.tolerance
                if not TEST:
                    print x_elt,  "!=",  y_elt
                self.assert_(TEST)
        else:
            TEST = abs(y-x)<ALL.param.tolerance
            if not TEST:
                print x,  "!=",  y
            self.assert_(TEST)


