from unittest import TestCase from benchmark.gcd import gcd class Test_gcd(TestCase): # distances_true = {1: [0]} # distances_false = {1: [1]} def test_gcd_1(self): assert gcd(a=1, b=376) == 1 # distances_true = {1: [3], 2: [309], 3: [306], 4: [0], 5: [0, 0, 1]} # distances_false = {1: [0], 2: [0], 3: [0], 4: [306], 5: [4, 2, 0]} def test_gcd_2(self): assert gcd(a=4, b=310) == 2 # distances_true = {1: [930], 2: [8], 3: [922], 4: [923], 5: [0, 0, 0, 1]} # distances_false = {1: [0], 2: [0], 3: [0], 4: [0], 5: [9, 4, 1, 0]} def test_gcd_3(self): assert gcd(a=931, b=9) == 1 # distances_true = {1: [698], 2: [0]} # distances_false = {1: [0], 2: [1]} def test_gcd_4(self): assert gcd(a=699, b=1) == 1