import unittest
import torch 
from utils import compute_r68

class Testutils(unittest.TestCase):
    def test_compute_r68(self):
        pred = torch.tensor([1.5, 3.0, 4.5, 6.0]) #5% pourcent d'err 
        true = torch.tensor([1.0, 2.0, 3.0, 4.0])
        r68=compute_r68(pred,true)

        expected = 0.5#expected 
        self.assertAlmostEqual(r68, expected)

if __name__ == '__main__':
    unittest.main()